Ejemplo n.º 1
0
        //-------------------------------------------------
        void Awake()
        {
            inputFocusAction = SteamVR_Events.InputFocusAction(OnInputFocus);

            if (hoverSphereTransform == null)
            {
                hoverSphereTransform = this.transform;
            }

            applicationLostFocusObject = new GameObject("_application_lost_focus");
            applicationLostFocusObject.transform.parent = transform;
            applicationLostFocusObject.SetActive(false);
        }
Ejemplo n.º 2
0
        protected virtual void Awake()
        {
            InitializeHandHelper();
            inputFocusAction = SteamVR_Events.InputFocusAction(OnInputFocus);

            if (hoverSphereTransform == null)
            {
                hoverSphereTransform = this.transform;
            }

            applicationLostFocusObject = new GameObject("_application_lost_focus");
            applicationLostFocusObject.transform.parent = transform;
            applicationLostFocusObject.SetActive(false);

            if (trackedObject == null)
            {
                trackedObject = this.gameObject.GetComponent <SteamVR_Behaviour_Pose>();
            }

            trackedObject.onTransformUpdated.AddListener(OnTransformUpdated);
        }
Ejemplo n.º 3
0
        public static void Initialize()
        {
            if (s_initialized || !Application.isPlaying)
            {
                return;
            }
            s_initialized = true;

            var system = OpenVR.System;

            if (system != null)
            {
                OnInputFocus(!system.IsInputFocusCapturedByAnotherProcess());
            }
            else
            {
                OnInputFocus(true);
            }

            SteamVR_Events.InputFocusAction(OnInputFocus).Enable(true);
            Camera.onPreCull += OnCameraPreCull;
        }
Ejemplo n.º 4
0
 SteamVR_ControllerManager()
 {
     inputFocusAction               = SteamVR_Events.InputFocusAction(OnInputFocus);
     deviceConnectedAction          = SteamVR_Events.DeviceConnectedAction(OnDeviceConnected);
     trackedDeviceRoleChangedAction = SteamVR_Events.SystemAction(EVREventType.VREvent_TrackedDeviceRoleChanged, OnTrackedDeviceRoleChanged);
 }
Ejemplo n.º 5
0
 void Awake()
 {
     mInputFocusAction = SteamVR_Events.InputFocusAction(OnInputFocus);
 }
Ejemplo n.º 6
0
 public override void Awake()
 {
     inputFocusAction = SteamVR_Events.InputFocusAction(OnInputFocus);
 }
Ejemplo n.º 7
0
 // Token: 0x06005EC9 RID: 24265 RVA: 0x00212BD8 File Offset: 0x00210FD8
 private SteamVR_ControllerManager()
 {
     this.inputFocusAction               = SteamVR_Events.InputFocusAction(new UnityAction <bool>(this.OnInputFocus));
     this.deviceConnectedAction          = SteamVR_Events.DeviceConnectedAction(new UnityAction <int, bool>(this.OnDeviceConnected));
     this.trackedDeviceRoleChangedAction = SteamVR_Events.SystemAction(EVREventType.VREvent_TrackedDeviceRoleChanged, new UnityAction <VREvent_t>(this.OnTrackedDeviceRoleChanged));
 }