24 lines
558 B
C#
24 lines
558 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using TMPro;
|
|||
|
|
|||
|
public class NetworkManagerDebug : MonoBehaviour {
|
|||
|
// Debug out the current state for visibility
|
|||
|
[Header("Current state")]
|
|||
|
public ExitGames.Client.Photon.LoadBalancing.ClientState currentState;
|
|||
|
|
|||
|
TMP_Text text;
|
|||
|
|
|||
|
private void Awake() {
|
|||
|
text = GetComponentInChildren<TMP_Text>();
|
|||
|
}
|
|||
|
|
|||
|
private void Update() {
|
|||
|
if (NetworkManager.net != null) {
|
|||
|
currentState = NetworkManager.net.State;
|
|||
|
text.text = currentState.ToString();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|