예제 #1
0
        public override void OnStartClient()
        {
            if (myNetworkManager == null)
            {
                myNetworkManager = CustomNetworkManager.Instance;
            }

            base.OnStartClient();
            Debug.Log("Client network player start");

            myNetworkManager.RegisterNetworkPlayer(this);
        }
예제 #2
0
        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>();
        }