Ejemplo n.º 1
0
        private void ConfigureEventSystem()
        {
            var eventSystem      = FindObjectOfType <EventSystem>();
            var eventSystemInput = SetEventSystem(eventSystem);

            pointerEventData           = new PointerEventData(eventSystem);
            pointerEventData.pointerId = (int)VRTK_SDK_Bridge.GetIndexOfTrackedObject(controller.gameObject) + 1000;
            eventSystemInput.pointers.Add(this);
        }
Ejemplo n.º 2
0
        private IEnumerator WaitForPointerId()
        {
            var index = (int)VRTK_SDK_Bridge.GetIndexOfTrackedObject(controller.gameObject);

            while (index < 0 || index == int.MaxValue)
            {
                index = (int)VRTK_SDK_Bridge.GetIndexOfTrackedObject(controller.gameObject);
                yield return(null);
            }
            pointerEventData.pointerId = index;
        }
Ejemplo n.º 3
0
 public static uint GetControllerIndex(GameObject controller)
 {
     return(VRTK_SDK_Bridge.GetIndexOfTrackedObject(controller));
 }