void OnEnable()
        {
            CurvedUIInputModule myTarget = (CurvedUIInputModule)target;


#if CURVEDUI_OCULUSVR
            //automatically find Oculus Rig, if possible
            if (myTarget.OculusCameraRig == null)
            {
                myTarget.OculusCameraRig = Object.FindObjectOfType <OVRCameraRig>();
            }
#elif CURVEDUI_STEAMVR_LEGACY
            //automatically find SteamVR Rig, if possible
            if (myTarget.SteamVRControllerManager == null)
            {
                myTarget.SteamVRControllerManager = Object.FindObjectOfType <SteamVR_ControllerManager>();
            }
#elif CURVEDUI_STEAMVR_2
            //automatically find SteamVR Rig, if possible
            if (myTarget.SteamVRPlayArea == null)
            {
                myTarget.SteamVRPlayArea = FindObjectOfType <Valve.VR.SteamVR_PlayArea>();
            }
#endif
        }
        void OnEnable()
        {
            CurvedUIInputModule myTarget = (CurvedUIInputModule)target;


#if CURVEDUI_TOUCH
            //automatically find Oculus Rig, if possible
            if (myTarget.OculusCameraRig == null)
                myTarget.OculusCameraRig = Object.FindObjectOfType<OVRCameraRig>();

#elif CURVEDUI_VIVE
            //automatically find SteamVR Rig, if possible
            if (myTarget.SteamVRControllerManager == null)
            myTarget.SteamVRControllerManager = Object.FindObjectOfType<SteamVR_ControllerManager>();          
#endif
        }
Example #3
0
#pragma warning restore 414, 0649
    #endregion



        #if CURVEDUI_GOOGLEVR
        #else // CURVEDUI_GOOGLEVR ELSE
    protected override void Awake()
    {
        if (!Application.isPlaying)
        {
            return;
        }

        Instance = this;
        base.Awake();

        #if CURVEDUI_VIVE
        //SEtup controllers for vive
        if (Controller == CurvedUIController.VIVE)
        {
            SetupViveControllers();
        }
        #endif // END OF CURVEDUI_VIVE IF
    }