public override void OnClientSceneChanged(NetworkConnection conn) { Debug.Log("OnClientScene"); base.OnClientSceneChanged(conn); if (networkInfo.CurStatus != (int)NetworkInfo.Status.Host) { networkInfo.CurStatus = (int)NetworkInfo.Status.Client; } GameObject[] goArr = GameObject.FindGameObjectsWithTag("NetworkObject"); foreach (GameObject go in goArr) { if (go.name == "NetworkLogic") { inGameNetworkBehaviour = go.GetComponent <InGameNetworkBehaviour> (); break; } } //inGameNetworkBehaviour.applyName (networkInfo.name); }
public override void OnStartClient() { Debug.Log("Start called"); base.OnStartClient(); GameObject[] goArr = GameObject.FindGameObjectsWithTag("NetworkObject"); bool found = false; foreach (GameObject go in goArr) { if (go.name == "NetworkManagerObject") { networkInfo = go.GetComponent <NetworkInfo> (); if (found) { break; } found = true; } if (go.name == "NetworkLogic") { inGameNetworkBehaviour = go.GetComponent <InGameNetworkBehaviour> (); if (found) { break; } found = true; } } /*goArr = GameObject.FindGameObjectsWithTag ("UserIngameUI"); * foreach (GameObject go in goArr) * if (go.name == "NicknamesDropDown") * { * dropdown = go.GetComponent<Dropdown> (); * break; * }*/ }