Class MixedRealityInspectorUtility
This class has handy inspector utilities and functions.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Utilities.Editor
Assembly: cs.temp.dll.dll
Syntax
public static class MixedRealityInspectorUtility
Fields
DarkColor
Declaration
public static readonly Color DarkColor
Field Value
Type | Description |
---|---|
Color |
DefaultConfigProfileName
Declaration
public const string DefaultConfigProfileName = "DefaultMixedRealityToolkitConfigurationProfile"
Field Value
Type | Description |
---|---|
String |
DisabledColor
Declaration
public static readonly Color DisabledColor
Field Value
Type | Description |
---|---|
Color |
DottedLineScreenSpace
Declaration
public const float DottedLineScreenSpace = 4.65F
Field Value
Type | Description |
---|---|
Single |
ErrorColor
Declaration
public static readonly Color ErrorColor
Field Value
Type | Description |
---|---|
Color |
HandleColorAxis
Declaration
public static readonly Color HandleColorAxis
Field Value
Type | Description |
---|---|
Color |
HandleColorCircle
Declaration
public static readonly Color HandleColorCircle
Field Value
Type | Description |
---|---|
Color |
HandleColorRotation
Declaration
public static readonly Color HandleColorRotation
Field Value
Type | Description |
---|---|
Color |
HandleColorSphere
Declaration
public static readonly Color HandleColorSphere
Field Value
Type | Description |
---|---|
Color |
HandleColorSquare
Declaration
public static readonly Color HandleColorSquare
Field Value
Type | Description |
---|---|
Color |
HandleColorTangent
Declaration
public static readonly Color HandleColorTangent
Field Value
Type | Description |
---|---|
Color |
LineVelocityColor
Declaration
public static readonly Color LineVelocityColor
Field Value
Type | Description |
---|---|
Color |
LogoDarkTheme
Declaration
public static readonly Texture2D LogoDarkTheme
Field Value
Type | Description |
---|---|
Texture2D |
LogoLightTheme
Declaration
public static readonly Texture2D LogoLightTheme
Field Value
Type | Description |
---|---|
Texture2D |
SectionColor
Declaration
public static readonly Color SectionColor
Field Value
Type | Description |
---|---|
Color |
SuccessColor
Declaration
public static readonly Color SuccessColor
Field Value
Type | Description |
---|---|
Color |
WarningColor
Declaration
public static readonly Color WarningColor
Field Value
Type | Description |
---|---|
Color |
Methods
AddMixedRealityToolkitToScene(MixedRealityToolkitConfigurationProfile)
If MRTK is not initialized in scene, adds and initializes instance to current scene
Declaration
public static void AddMixedRealityToolkitToScene(MixedRealityToolkitConfigurationProfile configProfile = null)
Parameters
Type | Name | Description |
---|---|---|
MixedRealityToolkitConfigurationProfile | configProfile |
AxisMoveHandle(Object, Vector3, Vector3, Single, Single, Boolean, Boolean)
Draw an axis move handle.
Declaration
public static float AxisMoveHandle(object target, Vector3 origin, Vector3 direction, float distance, float handleSize = 0.2F, bool autoSize = true, bool recordUndo = true)
Parameters
Type | Name | Description |
---|---|---|
Object | target | Object that is undergoing the transformation. Also used for recording undo. |
Vector3 | origin | The initial position of the axis. |
Vector3 | direction | The direction the axis is facing. |
Single | distance | Distance from the axis. |
Single | handleSize | Optional handle size. |
Boolean | autoSize | Optional, auto sizes the handles based on position and handle size. |
Boolean | recordUndo | Optional, records undo state. |
Returns
Type | Description |
---|---|
Single | The new Single value. |
CenterOnMainWin(EditorWindow)
Centers an editor window on the main display.
Declaration
public static void CenterOnMainWin(this EditorWindow window)
Parameters
Type | Name | Description |
---|---|---|
EditorWindow | window |
CheckMixedRealityConfigured(Boolean)
Check and make sure we have a Mixed Reality Toolkit and an active profile.
Declaration
public static bool CheckMixedRealityConfigured(bool renderEditorElements = false)
Parameters
Type | Name | Description |
---|---|---|
Boolean | renderEditorElements |
Returns
Type | Description |
---|---|
Boolean | True if the Mixed Reality Toolkit is properly initialized. |
CircleMoveHandle(Object, Vector3, Single, Single, Single, Single, Boolean, Boolean)
Draw a Circle Move Handle.
Declaration
public static Vector3 CircleMoveHandle(object target, Vector3 position, float xScale = 1F, float yScale = 1F, float zScale = 1F, float handleSize = 0.2F, bool autoSize = true, bool recordUndo = true)
Parameters
Type | Name | Description |
---|---|---|
Object | target | Object that is undergoing the transformation. Also used for recording undo. |
Vector3 | position | The position to draw the handle. |
Single | xScale | Scale the new value on the x axis by this amount. |
Single | yScale | Scale the new value on the x axis by this amount. |
Single | zScale | Scale the new value on the x axis by this amount. |
Single | handleSize | Optional handle size. |
Boolean | autoSize | Optional, auto sizes the handles based on position and handle size. |
Boolean | recordUndo | Optional, records undo state. |
Returns
Type | Description |
---|---|
Vector3 | The new Vector3 value. |
GetDefaultConfigProfile()
Returns the default config profile, if it exists.
Declaration
public static MixedRealityToolkitConfigurationProfile GetDefaultConfigProfile()
Returns
Type | Description |
---|---|
MixedRealityToolkitConfigurationProfile |
GetDefaultConfigProfile(MixedRealityToolkitConfigurationProfile[])
Given a list of MixedRealityToolkitConfigurationProfile objects, returns the one that matches the default profile name.
Declaration
public static MixedRealityToolkitConfigurationProfile GetDefaultConfigProfile(MixedRealityToolkitConfigurationProfile[] allProfiles)
Parameters
Type | Name | Description |
---|---|---|
MixedRealityToolkitConfigurationProfile[] | allProfiles |
Returns
Type | Description |
---|---|
MixedRealityToolkitConfigurationProfile |
GetEditorMainWindowPos()
Declaration
public static Rect GetEditorMainWindowPos()
Returns
Type | Description |
---|---|
Rect |
RenderMixedRealityToolkitLogo()
Render the Mixed Reality Toolkit Logo.
Declaration
public static void RenderMixedRealityToolkitLogo()
RotationHandle(Object, Vector3, Quaternion, Single, Boolean, Boolean)
Draw a rotation handle.
Declaration
public static Quaternion RotationHandle(object target, Vector3 position, Quaternion rotation, float handleSize = 0.2F, bool autoSize = true, bool recordUndo = true)
Parameters
Type | Name | Description |
---|---|---|
Object | target | Object that is undergoing the transformation. Also used for recording undo. |
Vector3 | position | The position to draw the handle. |
Quaternion | rotation | The rotation to draw the handle. |
Single | handleSize | Optional, handle size. |
Boolean | autoSize | Optional, auto sizes the handles based on position and handle size. |
Boolean | recordUndo | Optional, records undo state. |
Returns
Type | Description |
---|---|
Quaternion | The new Quaternion value. |
SphereMoveHandle(Object, Vector3, Single, Single, Single, Single, Boolean, Boolean)
Draw a sphere move handle.
Declaration
public static Vector3 SphereMoveHandle(object target, Vector3 position, float xScale = 1F, float yScale = 1F, float zScale = 1F, float handleSize = 0.2F, bool autoSize = true, bool recordUndo = true)
Parameters
Type | Name | Description |
---|---|---|
Object | target | Object that is undergoing the transformation. Also used for recording undo. |
Vector3 | position | The position to draw the handle. |
Single | xScale | Scale the new value on the x axis by this amount. |
Single | yScale | Scale the new value on the x axis by this amount. |
Single | zScale | Scale the new value on the x axis by this amount. |
Single | handleSize | Optional handle size. |
Boolean | autoSize | Optional, auto sizes the handles based on position and handle size. |
Boolean | recordUndo | Optional, records undo state. |
Returns
Type | Description |
---|---|
Vector3 | The new Vector3 value. |
SquareMoveHandle(Object, Vector3, Single, Single, Single, Single, Boolean, Boolean)
Draw a square move handle.
Declaration
public static Vector3 SquareMoveHandle(object target, Vector3 position, float xScale = 1F, float yScale = 1F, float zScale = 1F, float handleSize = 0.2F, bool autoSize = true, bool recordUndo = true)
Parameters
Type | Name | Description |
---|---|---|
Object | target | Object that is undergoing the transformation. Also used for recording undo. |
Vector3 | position | The position to draw the handle. |
Single | xScale | Scale the new value on the x axis by this amount. |
Single | yScale | Scale the new value on the x axis by this amount. |
Single | zScale | Scale the new value on the x axis by this amount. |
Single | handleSize | Optional handle size. |
Boolean | autoSize | Optional, auto sizes the handles based on position and handle size. |
Boolean | recordUndo | Optional, records undo state. |
Returns
Type | Description |
---|---|
Vector3 | The new Vector3 value. |
VectorHandle(Object, Vector3, Vector3, Boolean, Boolean, Single, Single, Boolean, Boolean)
Draw a vector handle.
Declaration
public static Vector3 VectorHandle(object target, Vector3 origin, Vector3 vector, bool normalize = true, bool clamp = true, float handleLength = 1F, float handleSize = 0.1F, bool recordUndo = true, bool autoSize = true)
Parameters
Type | Name | Description |
---|---|---|
Object | target | Object that is undergoing the transformation. Also used for recording undo. |
Vector3 | origin | |
Vector3 | vector | |
Boolean | normalize | Optional, Normalize the new vector value. |
Boolean | clamp | Optional, Clamp new vector's value based on the distance to the origin. |
Single | handleLength | Optional, handle length. |
Single | handleSize | Optional, handle size. |
Boolean | recordUndo | Optional, records undo state. |
Boolean | autoSize | Optional, auto sizes the handles based on position and handle size. |
Returns
Type | Description |
---|---|
Vector3 | The new Vector3 value. |