예제 #1
0
        private void CheckDevice(OnSetupVRReady info)
        {
            if (OnSetupVRReady.IsCallbackRegistered(CheckDevice))
            {
                OnSetupVRReady.Listeners -= CheckDevice;
            }

            if (VRDF_Components.DeviceLoaded != Core.SetupVR.EDevice.SIMULATOR || VRUISetupHelper.ShouldRegisterForSimulator(this))
            {
                OnVRClickerStartClicking.Listeners += CheckClickedObject;
            }
        }
예제 #2
0
        protected override void Awake()
        {
            base.Awake();

            if (Application.isPlaying)
            {
                if (LaserClickable && VRUISetupHelper.ShouldRegisterForSimulator(this))
                {
                    OnVRClickerStartClicking.Listeners += CheckClickedObject;
                }

                if (ControllerClickable)
                {
                    GetComponent <BoxCollider>().isTrigger = true;
                }

                SetInputFieldReferences();
            }
        }