private void OnEnable() { if (networkManager == null) { networkManager = GameObject.FindGameObjectWithTag("NetworkManager").GetComponent <NetworkManagerMG>(); } }
// Start is called before the first frame update void Start() { //The NetworkManagerMG object contains the list of NetworkGamePlayer objects //Used to reference permenant variables associated with the player NetworkMan = GameObject.FindObjectOfType <NetworkManagerMG>(); //PlayerList = NetworkMan.GamePlayers; TimeToBeatText = GameObject.Find("TimeToBeatUI").GetComponent <TMP_Text>(); this.enabled = true; foreach (NetworkGamePlayer player in PlayerList) { Debug.Log("Wecome Player: " + player.displayName); } }
private void Start() { NetworkManager = GameObject.FindGameObjectWithTag("NetworkManager").GetComponent <NetworkManagerMG>(); }