API reference
API reference
Select your platform
No SDKs available
No versions available

OVRHandTest Class

Extends MonoBehaviour
Use this class to help with debugging the state of OVRInput in sample scenes such as "HandTest" (in Assets/Oculus/VR/Scenes/HandTest.unity).
This script logs HandState, Skeletons, and Meshes for the left and right hand. Access uiText to get the logging data.

Fields

uiText : Text
The UI text used in outputting the debug records related to the bools that are being monitored (HandState, Skeletons, and Meshes).
Signature
Text uiText

Inner Class

BoolMonitor Class

This class monitors a bool with the intention of recording its value and whether this value has changed.
The record can be used by UI elements (including OVRHandTest.uiText) to output the bool's value as a tool for debugging.

Constructors

BoolMonitor ( name , generator , displayTimeout )
Signature
BoolMonitor(string name, BoolGenerator generator, float displayTimeout=0.5f)
Parameters
name: string
generator: BoolGenerator
displayTimeout: float

Methods

AppendToStringBuilder ( sb )
Given a string builder, this appends the current value of the bool onto the string builder.
If the value is different from the previous value, it adds asterisks around it.
Signature
void AppendToStringBuilder(ref StringBuilder sb)
Parameters
sb: ref StringBuilder  The string builder you want to append to.
Returns
void
BoolGenerator ()
This is a delegate that represents a function where a bool value is being turned on or off.
This is the bool the class will be monitoring.
Signature
delegate bool BoolGenerator()
Returns
delegate bool
Update ()
This method checks if the previous value of the bool is different from the current value and updates the display timer accordingly.
Used by OVRHandTest.Update.
Signature
void Update()
Returns
void