public override void OnStartClient() { if (myNetworkManager == null) { myNetworkManager = CustomNetworkManager.Instance; } base.OnStartClient(); Debug.Log("Client network player start"); myNetworkManager.RegisterNetworkPlayer(this); }
void Start() { var localVRSystemInstance = GameObject.FindGameObjectsWithTag(Constants.Tag.LocalVRSystem); if (UnityEngine.VR.VRSettings.enabled) { if (localVRSystemInstance.Length == 0) { DontDestroyOnLoad(Instantiate(localVRSystem, Vector3.zero, Quaternion.identity)); } StartCoroutine(InitInputListeners()); } networkManager = GameObject.FindGameObjectWithTag(Constants.Tag.NetworkManager).GetComponent <CustomNetworkManager>(); }