Пример #1
0
    public void OnPointerEnter(PointerEventData e)
    {
        PointerEventData ped = e as OSVRRayPointerEventData;

        if (ped != null)
        {
            // Gaze has entered this canvas. We'll make it the active one so that canvas-mouse pointer can be used.
            OSVRInputModule inputModule = EventSystem.current.currentInputModule as OSVRInputModule;
            inputModule.activeGraphicRaycaster = this;
        }
    }
Пример #2
0
    /// <summary>
    /// Is this the currently focussed Raycaster according to the InputModule
    /// </summary>
    /// <returns></returns>
    public bool IsFocussed()
    {
        OSVRInputModule inputModule = EventSystem.current.currentInputModule as OSVRInputModule;

        return(inputModule && inputModule.activeGraphicRaycaster == this);
    }