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

InspectorHelper Class

A collection of useful functions for drawing

Static Methods

DrawDropDown ( serializedObject , position , labelName , propertyName , options , defaultValue )
Draws a dropdown for the given object
Signature
static string Oculus.Voice.Utility.InspectorHelper.DrawDropDown(SerializedObject serializedObject, Rect position, string labelName, string propertyName, string[] options, string defaultValue="")
Parameters
serializedObject: SerializedObject  the object containing the relevant data
position: Rect  The position rect from the calling OnGUI
labelName: string  the label text to show
propertyName: string  the raw text name of the property to set
options: string []  the dropdown options to be presented
defaultValue: string  What value to save to the property when nothing is selected.
Returns
string
DrawHeader ( header , tooltip )
Draws the given header text with the given tooltip text
Signature
static void Oculus.Voice.Utility.InspectorHelper.DrawHeader(string header, string tooltip="")
Parameters
header: string
tooltip: string
Returns
void
DrawHorizontalLine ()
Draws a horizontal line for visual separation.
Signature
static void Oculus.Voice.Utility.InspectorHelper.DrawHorizontalLine()
Returns
void
DrawProperty ( serializedObject , propertyName )
Does the default drawing for the given property on the given object
Signature
static void Oculus.Voice.Utility.InspectorHelper.DrawProperty(SerializedObject serializedObject, string propertyName)
Parameters
serializedObject: SerializedObject
propertyName: string
Returns
void
DrawSystemProperties ( serializedObject , propertyNames , header )
Draws all the given properties of the given serializedObject with the included header
Signature
static void Oculus.Voice.Utility.InspectorHelper.DrawSystemProperties(SerializedObject serializedObject, string[] propertyNames, string header)
Parameters
serializedObject: SerializedObject  the object on which exist the given properties
propertyNames: string []  raw text names of the properties to draw
header: string  the header text to use, when appropriate
Returns
void