Unity v27 Reference Guide

UnityEngine::EventSystems::OVRInputModule Class Reference

VR extension of PointerInputModule which supports gaze and controller pointing.
PointerInputModule inherited by UnityEngine::EventSystems::OVRInputModule.

Public Types

enum
InputMode {
}

Private Data Fields

float
float
Vector2
Vector2
string
string
Name of the vertical axis for movement (if axis events are used).
string
Name of the submit button.
string
Name of the submit button.
float
bool
readonly MouseState

Properties

InputMode
inputMode ( ) [Get]
bool
float
string
horizontalAxis ( ) [Get]
Name of the horizontal axis for movement (if axis events are used).
string
verticalAxis ( ) [Get]
Name of the vertical axis for movement (if axis events are used).
string
submitButton ( ) [Get]
string
cancelButton ( ) [Get]

Object Data

Dictionary< int, OVRPointerEventData >

Object Data

void
Convenience function for cloning PointerEventData
new void
CopyFromTo ( PointerEventData @ from, PointerEventData @ to )
Convenience function for cloning PointerEventData
bool
GetPointerData ( int id, out OVRPointerEventData data, bool create )
new void
Clear pointer state for both types of pointer
MouseState
State for a pointer controlled by a world space ray.
MouseState
Get state for pointer which is a pointer moving in world space across the surface of a world space canvas.
Vector2
SwipeAdjustedPosition ( Vector2 originalPosition, PointerEventData pointerEvent )
override void
ProcessDrag ( PointerEventData pointerEvent )
Exactly the same as the code from PointerInputModule, except that we call our own IsPointerMoving.
PointerEventData.FramePressState
Get state of button corresponding to gaze pointer
Vector2
Get extra scroll delta from gamepad

Public Member Functions

override void
override bool
override bool
override void
override void
override void
Process ( )
Process this InputModule.

Private Member Functions

bool
Process submit keys.
bool
AllowMoveEventProcessing ( float time )
Vector2
bool
Process keyboard events.
bool
void
ProcessMousePress ( MouseButtonEventData data )
Process the current mouse press.
void
ProcessMouseEvent ( MouseState mouseData )
Process all mouse events.
bool
ShouldStartDrag ( PointerEventData pointerEvent )
New version of ShouldStartDrag implemented first in PointerInputModule.

Object Data

static bool
UseMouse ( bool pressed, bool released, PointerEventData pointerData )
Decide if mouse events need to be processed this frame.
static Vector3
GetRectTransformNormal ( RectTransform rectTransform )
For RectTransform, calculate it's normal in world space
static bool
IsPointerMoving ( PointerEventData pointerEvent )
The purpose of this function is to allow us to switch between using the standard IsPointerMoving method for mouse driven pointers, but to always return true when it's a ray based pointer.

Member Enumeration Documentation

enum UnityEngine::EventSystems::OVRInputModule.InputMode
Enumerator
Mouse
Buttons

Field Documentation

Transform UnityEngine.EventSystems.OVRInputModule.rayTransform ( )
OVRCursor UnityEngine.EventSystems.OVRInputModule.m_Cursor ( )
OVRInput.Button UnityEngine.EventSystems.OVRInputModule.joyPadClickButton ( )
KeyCode UnityEngine.EventSystems.OVRInputModule.gazeClickKey ( )
bool UnityEngine.EventSystems.OVRInputModule.performSphereCastForGazepointer ( )
bool UnityEngine.EventSystems.OVRInputModule.useRightStickScroll ( )
float UnityEngine.EventSystems.OVRInputModule.rightStickDeadZone ( )
bool UnityEngine.EventSystems.OVRInputModule.useSwipeScroll ( )
float UnityEngine.EventSystems.OVRInputModule.swipeDragThreshold ( )
float UnityEngine.EventSystems.OVRInputModule.swipeDragScale ( )
bool UnityEngine.EventSystems.OVRInputModule.InvertSwipeXAxis ( )
OVRRaycaster UnityEngine.EventSystems.OVRInputModule.activeGraphicRaycaster ( )
float UnityEngine.EventSystems.OVRInputModule.angleDragThreshold ( )

Object Data Documentation

float UnityEngine.EventSystems.OVRInputModule.m_SpherecastRadius ( )
float UnityEngine.EventSystems.OVRInputModule.m_NextAction ( )
Vector2 UnityEngine.EventSystems.OVRInputModule.m_LastMousePosition ( )
Vector2 UnityEngine.EventSystems.OVRInputModule.m_MousePosition ( )
string UnityEngine.EventSystems.OVRInputModule.m_HorizontalAxis ( )
string UnityEngine.EventSystems.OVRInputModule.m_VerticalAxis ( )
Name of the vertical axis for movement (if axis events are used).
string UnityEngine.EventSystems.OVRInputModule.m_SubmitButton ( )
Name of the submit button.
string UnityEngine.EventSystems.OVRInputModule.m_CancelButton ( )
Name of the submit button.
float UnityEngine.EventSystems.OVRInputModule.m_InputActionsPerSecond ( )
bool UnityEngine.EventSystems.OVRInputModule.m_AllowActivationOnMobileDevice ( )
readonly MouseState UnityEngine.EventSystems.OVRInputModule.m_MouseState ( )

Property Documentation

InputMode UnityEngine.EventSystems.OVRInputModule.inputMode ( )
bool UnityEngine.EventSystems.OVRInputModule.allowActivationOnMobileDevice ( )
float UnityEngine.EventSystems.OVRInputModule.inputActionsPerSecond ( )
string UnityEngine.EventSystems.OVRInputModule.horizontalAxis ( )
Name of the horizontal axis for movement (if axis events are used).
string UnityEngine.EventSystems.OVRInputModule.verticalAxis ( )
Name of the vertical axis for movement (if axis events are used).
string UnityEngine.EventSystems.OVRInputModule.submitButton ( )
string UnityEngine.EventSystems.OVRInputModule.cancelButton ( )

Object Data Documentation

Dictionary<int, OVRPointerEventData> UnityEngine.EventSystems.OVRInputModule.m_VRRayPointerData ( )

Object Data Documentation

UnityEngine.EventSystems.OVRInputModule.OVRInputModule ( )
void UnityEngine.EventSystems.OVRInputModule.CopyFromTo ( OVRPointerEventData @ from, OVRPointerEventData @ to )
Convenience function for cloning PointerEventData
Parameters
from
Copy this value
to
to this object
new void UnityEngine.EventSystems.OVRInputModule.CopyFromTo ( PointerEventData @ from, PointerEventData @ to )
Convenience function for cloning PointerEventData
Parameters
from
Copy this value
to
to this object
bool UnityEngine.EventSystems.OVRInputModule.GetPointerData ( int id, out OVRPointerEventData data, bool create )
new void UnityEngine.EventSystems.OVRInputModule.ClearSelection ( )
Clear pointer state for both types of pointer
virtual MouseState UnityEngine.EventSystems.OVRInputModule.GetGazePointerData ( )
State for a pointer controlled by a world space ray.
E.g. gaze pointer
MouseState UnityEngine.EventSystems.OVRInputModule.GetCanvasPointerData ( )
Get state for pointer which is a pointer moving in world space across the surface of a world space canvas.
Vector2 UnityEngine.EventSystems.OVRInputModule.SwipeAdjustedPosition ( Vector2 originalPosition, PointerEventData pointerEvent )
override void UnityEngine.EventSystems.OVRInputModule.ProcessDrag ( PointerEventData pointerEvent )
Exactly the same as the code from PointerInputModule, except that we call our own IsPointerMoving.
This would also not be necessary if PointerEventData.IsPointerMoving was virtual
Parameters
pointerEvent
virtual PointerEventData.FramePressState UnityEngine.EventSystems.OVRInputModule.GetGazeButtonState ( )
Get state of button corresponding to gaze pointer
Vector2 UnityEngine.EventSystems.OVRInputModule.GetExtraScrollDelta ( )
Get extra scroll delta from gamepad

Member Function Documentation

override void UnityEngine.EventSystems.OVRInputModule.UpdateModule ( )
override bool UnityEngine.EventSystems.OVRInputModule.IsModuleSupported ( )
override bool UnityEngine.EventSystems.OVRInputModule.ShouldActivateModule ( )
override void UnityEngine.EventSystems.OVRInputModule.ActivateModule ( )
override void UnityEngine.EventSystems.OVRInputModule.DeactivateModule ( )
override void UnityEngine.EventSystems.OVRInputModule.Process ( )
Process this InputModule.
Same as the StandaloneInputModule version, except that it calls ProcessMouseEvent twice, once for gaze pointers, and once for mouse pointers.

Object Data Documentation

bool UnityEngine.EventSystems.OVRInputModule.SendSubmitEventToSelectedObject ( )
Process submit keys.
bool UnityEngine.EventSystems.OVRInputModule.AllowMoveEventProcessing ( float time )
Vector2 UnityEngine.EventSystems.OVRInputModule.GetRawMoveVector ( )
bool UnityEngine.EventSystems.OVRInputModule.SendMoveEventToSelectedObject ( )
Process keyboard events.
bool UnityEngine.EventSystems.OVRInputModule.SendUpdateEventToSelectedObject ( )
void UnityEngine.EventSystems.OVRInputModule.ProcessMousePress ( MouseButtonEventData data )
Process the current mouse press.
void UnityEngine.EventSystems.OVRInputModule.ProcessMouseEvent ( MouseState mouseData )
Process all mouse events.
This is the same as the StandaloneInputModule version except that it takes MouseState as a parameter, allowing it to be used for both Gaze and Mouse pointerss.
bool UnityEngine.EventSystems.OVRInputModule.ShouldStartDrag ( PointerEventData pointerEvent )
New version of ShouldStartDrag implemented first in PointerInputModule.
This version differs in that for ray based pointers it makes a decision about whether a drag should start based on the angular change the pointer has made so far, as seen from the camera. This also works when the world space ray is translated rather than rotated, since the beginning and end of the movement are considered as angle from the same point.

Object Data Documentation

static bool UnityEngine.EventSystems.OVRInputModule.UseMouse ( bool pressed, bool released, PointerEventData pointerData )
Decide if mouse events need to be processed this frame.
Same as StandloneInputModule except that the IsPointerMoving method from this class is used, instead of the method on PointerEventData
static Vector3 UnityEngine.EventSystems.OVRInputModule.GetRectTransformNormal ( RectTransform rectTransform )
For RectTransform, calculate it's normal in world space
static bool UnityEngine.EventSystems.OVRInputModule.IsPointerMoving ( PointerEventData pointerEvent )
The purpose of this function is to allow us to switch between using the standard IsPointerMoving method for mouse driven pointers, but to always return true when it's a ray based pointer.
All real-world ray-based input devices are always moving so for simplicity we just return true for them.
If PointerEventData.IsPointerMoving was virtual we could just override that in OVRRayPointerEventData.
Parameters
pointerEvent
The documentation for this class was generated from the following file: Oculus/VR/Scripts/Util/OVRInputModule.cs