コード例 #1
0
 public void OnPointerEnter(PointerEventData e)
 {
     if (e.IsVRPointer())
     {
         // Gaze has entered this canvas. We'll make it the active one so that canvas-mouse pointer can be used.
         VRTKInputModule inputModule = EventSystem.current.currentInputModule as VRTKInputModule;
         if (inputModule != null)
         {
             inputModule.activeGraphicRaycaster = this;
         }
     }
 }
コード例 #2
0
    /// <summary>
    /// Is this the currently focussed Raycaster according to the InputModule
    /// </summary>
    /// <returns></returns>
    public bool IsFocussed()
    {
        VRTKInputModule inputModule = EventSystem.current.currentInputModule as VRTKInputModule;

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