protected override void Awake()
 {
     base.Awake();
     Impl          = new GvrPointerInputModuleImpl();
     EventExecutor = new GvrEventExecutor();
     UpdateImplProperties();
 }
    protected override void Awake()
    {
        UnityEngine.XR.XRSettings.enabled = true;

        base.Awake();
        Impl          = new GvrPointerInputModuleImpl();
        EventExecutor = new GvrEventExecutor();
        UpdateImplProperties();
    }
        private void RemoveListeners()
        {
            GvrEventExecutor executor = GvrPointerInputModule.FindEventExecutor();

            if (executor == null)
            {
                return;
            }

            executor.OnPointerClick -= OnPointerClick;
        }
Example #4
0
    private void RemoveListeners()
    {
        GvrEventExecutor eventExecutor = GvrPointerInputModule.FindEventExecutor();

        if (eventExecutor == null)
        {
            return;
        }

        eventExecutor.OnPointerClick -= OnPointerClickHandler;
        eventExecutor.OnPointerDown  -= OnPointerDownHandler;
        eventExecutor.OnPointerUp    -= OnPointerUpHandler;
        eventExecutor.OnPointerEnter -= OnPointerEnterHandler;
        eventExecutor.OnPointerExit  -= OnPointerExitHandler;
    }
Example #5
0
    private void AddListeners()
    {
        GvrEventExecutor eventExecutor = GvrPointerInputModule.FindEventExecutor();

        if (eventExecutor == null)
        {
            return;
        }

        eventExecutor.OnPointerClick += OnPointerClickHandler;
        eventExecutor.OnPointerDown  += OnPointerDownHandler;
        eventExecutor.OnPointerUp    += OnPointerUpHandler;
        eventExecutor.OnPointerEnter += OnPointerEnterHandler;
        eventExecutor.OnPointerExit  += OnPointerExitHandler;
    }
Example #6
0
    void Start()
    {
        _trigger = GetComponent <EventTrigger>();
        EventTrigger.Entry entry = new EventTrigger.Entry();
        entry.eventID = EventTriggerType.PointerDown;
        entry.callback.AddListener((data) => OnClick());
        _trigger.triggers.Add(entry);



        EventTrigger.Entry entry2 = new EventTrigger.Entry();
        entry2.eventID = EventTriggerType.PointerUp;
        entry2.callback.AddListener((data) => OnExit());
        _trigger.triggers.Add(entry2);


        rb = GetComponent <Rigidbody>();
        GvrEventExecutor eventExecutor = GvrPointerInputModule.FindEventExecutor();

        eventExecutor.OnPointerClick += OnItemInterract;
    }