C# Class Microsoft.MixedReality.Toolkit.Utilities.Editor.MixedRealityInspectorUtility

This class has handy inspector utilities and functions.
Afficher le fichier Open project: microsoft/MixedReality-WorldLockingTools-Samples Class Usage Examples

Méthodes publiques

Свойство Type Description
DarkColor Color
DisabledColor Color
ErrorColor Color
HandleColorAxis Color
HandleColorCircle Color
HandleColorRotation Color
HandleColorSphere Color
HandleColorSquare Color
HandleColorTangent Color
LineVelocityColor Color
LogoDarkTheme Texture2D
LogoLightTheme Texture2D
SectionColor Color
SuccessColor Color
WarningColor Color

Méthodes publiques

Méthode Description
AddMixedRealityToolkitToScene ( MixedRealityToolkitConfigurationProfile configProfile = null, bool inPlayMode = false ) : void

If MRTK is not initialized in scene, adds and initializes instance to current scene

AxisMoveHandle ( Object target, Vector3 origin, Vector3 direction, float distance, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : float

Draw an axis move handle.

CenterOnMainWin ( EditorWindow window ) : void

Centers an editor window on the main display.

CheckMixedRealityConfigured ( bool renderEditorElements = false ) : bool

Check and make sure we have a Mixed Reality Toolkit and an active profile.

CircleMoveHandle ( Object target, Vector3 position, float xScale = 1f, float yScale = 1f, float zScale = 1f, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Vector3

Draw a Circle Move Handle.

DrawProfileDropDownList ( SerializedProperty property, BaseMixedRealityProfile profile, Object oldProfileObject, Array profileTypes, bool requiresProfile, bool showAddButton ) : bool

Draws a dropdown with all available profiles of types contained in the array profilyTypes.

DrawProfileDropDownList ( SerializedProperty property, BaseMixedRealityProfile profile, Object oldProfileObject, Type profileType, bool requiresProfile, bool showAddButton ) : bool

Draws a dropdown with all available profiles of profilyType.

DrawSubProfileEditor ( Object profileObject, bool renderProfileInBox ) : void

Draws an editor for a profile object.

GetDefaultConfigProfile ( ) : MixedRealityToolkitConfigurationProfile

Returns the default config profile, if it exists.

GetDefaultConfigProfile ( Array allProfiles ) : MixedRealityToolkitConfigurationProfile

Given a list of MixedRealityToolkitConfigurationProfile objects, returns the one that matches the default profile name.

GetEditorMainWindowPos ( ) : Rect

Found at https://answers.unity.com/questions/960413/editor-window-how-to-center-a-window.html

RenderMixedRealityToolkitLogo ( ) : void

Render the Mixed Reality Toolkit Logo.

RotationHandle ( Object target, Vector3 position, Quaternion rotation, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Quaternion

Draw a rotation handle.

SphereMoveHandle ( Object target, Vector3 position, float xScale = 1f, float yScale = 1f, float zScale = 1f, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Vector3

Draw a sphere move handle.

SquareMoveHandle ( Object target, Vector3 position, float xScale = 1f, float yScale = 1f, float zScale = 1f, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Vector3

Draw a square move handle.

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 ) : Vector3

Draw a vector handle.

Private Methods

Méthode Description
GetAllDerivedTypes ( AppDomain appDomain, Type aType ) : Type[]

Method Details

AddMixedRealityToolkitToScene() public static méthode

If MRTK is not initialized in scene, adds and initializes instance to current scene
public static AddMixedRealityToolkitToScene ( MixedRealityToolkitConfigurationProfile configProfile = null, bool inPlayMode = false ) : void
configProfile MixedRealityToolkitConfigurationProfile
inPlayMode bool
Résultat void

AxisMoveHandle() public static méthode

Draw an axis move handle.
public static AxisMoveHandle ( Object target, Vector3 origin, Vector3 direction, float distance, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : float
target UnityEngine.Object Object that is undergoing the transformation. Also used for recording undo.
origin Vector3 The initial position of the axis.
direction Vector3 The direction the axis is facing.
distance float Distance from the axis.
handleSize float Optional handle size.
autoSize bool Optional, auto sizes the handles based on position and handle size.
recordUndo bool Optional, records undo state.
Résultat float

CenterOnMainWin() public static méthode

Centers an editor window on the main display.
public static CenterOnMainWin ( EditorWindow window ) : void
window EditorWindow
Résultat void

CheckMixedRealityConfigured() public static méthode

Check and make sure we have a Mixed Reality Toolkit and an active profile.
public static CheckMixedRealityConfigured ( bool renderEditorElements = false ) : bool
renderEditorElements bool
Résultat bool

CircleMoveHandle() public static méthode

Draw a Circle Move Handle.
public static CircleMoveHandle ( Object target, Vector3 position, float xScale = 1f, float yScale = 1f, float zScale = 1f, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Vector3
target UnityEngine.Object Object that is undergoing the transformation. Also used for recording undo.
position Vector3 The position to draw the handle.
xScale float Scale the new value on the x axis by this amount.
yScale float Scale the new value on the x axis by this amount.
zScale float Scale the new value on the x axis by this amount.
handleSize float Optional handle size.
autoSize bool Optional, auto sizes the handles based on position and handle size.
recordUndo bool Optional, records undo state.
Résultat Vector3

DrawProfileDropDownList() public static méthode

Draws a dropdown with all available profiles of types contained in the array profilyTypes.
public static DrawProfileDropDownList ( SerializedProperty property, BaseMixedRealityProfile profile, Object oldProfileObject, Array profileTypes, bool requiresProfile, bool showAddButton ) : bool
property SerializedProperty
profile BaseMixedRealityProfile
oldProfileObject UnityEngine.Object
profileTypes Array
requiresProfile bool
showAddButton bool
Résultat bool

DrawProfileDropDownList() public static méthode

Draws a dropdown with all available profiles of profilyType.
public static DrawProfileDropDownList ( SerializedProperty property, BaseMixedRealityProfile profile, Object oldProfileObject, Type profileType, bool requiresProfile, bool showAddButton ) : bool
property SerializedProperty
profile BaseMixedRealityProfile
oldProfileObject UnityEngine.Object
profileType Type
requiresProfile bool
showAddButton bool
Résultat bool

DrawSubProfileEditor() public static méthode

Draws an editor for a profile object.
public static DrawSubProfileEditor ( Object profileObject, bool renderProfileInBox ) : void
profileObject UnityEngine.Object
renderProfileInBox bool
Résultat void

GetDefaultConfigProfile() public static méthode

Returns the default config profile, if it exists.
public static GetDefaultConfigProfile ( ) : MixedRealityToolkitConfigurationProfile
Résultat MixedRealityToolkitConfigurationProfile

GetDefaultConfigProfile() public static méthode

Given a list of MixedRealityToolkitConfigurationProfile objects, returns the one that matches the default profile name.
public static GetDefaultConfigProfile ( Array allProfiles ) : MixedRealityToolkitConfigurationProfile
allProfiles Array
Résultat MixedRealityToolkitConfigurationProfile

GetEditorMainWindowPos() public static méthode

Found at https://answers.unity.com/questions/960413/editor-window-how-to-center-a-window.html
public static GetEditorMainWindowPos ( ) : Rect
Résultat Rect

RenderMixedRealityToolkitLogo() public static méthode

Render the Mixed Reality Toolkit Logo.
public static RenderMixedRealityToolkitLogo ( ) : void
Résultat void

RotationHandle() public static méthode

Draw a rotation handle.
public static RotationHandle ( Object target, Vector3 position, Quaternion rotation, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Quaternion
target UnityEngine.Object Object that is undergoing the transformation. Also used for recording undo.
position Vector3 The position to draw the handle.
rotation Quaternion The rotation to draw the handle.
handleSize float Optional, handle size.
autoSize bool Optional, auto sizes the handles based on position and handle size.
recordUndo bool Optional, records undo state.
Résultat Quaternion

SphereMoveHandle() public static méthode

Draw a sphere move handle.
public static SphereMoveHandle ( Object target, Vector3 position, float xScale = 1f, float yScale = 1f, float zScale = 1f, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Vector3
target UnityEngine.Object Object that is undergoing the transformation. Also used for recording undo.
position Vector3 The position to draw the handle.
xScale float Scale the new value on the x axis by this amount.
yScale float Scale the new value on the x axis by this amount.
zScale float Scale the new value on the x axis by this amount.
handleSize float Optional handle size.
autoSize bool Optional, auto sizes the handles based on position and handle size.
recordUndo bool Optional, records undo state.
Résultat Vector3

SquareMoveHandle() public static méthode

Draw a square move handle.
public static SquareMoveHandle ( Object target, Vector3 position, float xScale = 1f, float yScale = 1f, float zScale = 1f, float handleSize = 0.2f, bool autoSize = true, bool recordUndo = true ) : Vector3
target UnityEngine.Object Object that is undergoing the transformation. Also used for recording undo.
position Vector3 The position to draw the handle.
xScale float Scale the new value on the x axis by this amount.
yScale float Scale the new value on the x axis by this amount.
zScale float Scale the new value on the x axis by this amount.
handleSize float Optional handle size.
autoSize bool Optional, auto sizes the handles based on position and handle size.
recordUndo bool Optional, records undo state.
Résultat Vector3

VectorHandle() public static méthode

Draw a vector handle.
public static 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 ) : Vector3
target UnityEngine.Object Object that is undergoing the transformation. Also used for recording undo.
origin Vector3
vector Vector3
normalize bool Optional, Normalize the new vector value.
clamp bool Optional, Clamp new vector's value based on the distance to the origin.
handleLength float Optional, handle length.
handleSize float Optional, handle size.
recordUndo bool Optional, records undo state.
autoSize bool Optional, auto sizes the handles based on position and handle size.
Résultat Vector3

Property Details

DarkColor public_oe static_oe property

public static Color DarkColor
Résultat Color

DisabledColor public_oe static_oe property

public static Color DisabledColor
Résultat Color

ErrorColor public_oe static_oe property

public static Color ErrorColor
Résultat Color

HandleColorAxis public_oe static_oe property

public static Color HandleColorAxis
Résultat Color

HandleColorCircle public_oe static_oe property

public static Color HandleColorCircle
Résultat Color

HandleColorRotation public_oe static_oe property

public static Color HandleColorRotation
Résultat Color

HandleColorSphere public_oe static_oe property

public static Color HandleColorSphere
Résultat Color

HandleColorSquare public_oe static_oe property

public static Color HandleColorSquare
Résultat Color

HandleColorTangent public_oe static_oe property

public static Color HandleColorTangent
Résultat Color

LineVelocityColor public_oe static_oe property

public static Color LineVelocityColor
Résultat Color

LogoDarkTheme public_oe static_oe property

public static Texture2D LogoDarkTheme
Résultat Texture2D

LogoLightTheme public_oe static_oe property

public static Texture2D LogoLightTheme
Résultat Texture2D

SectionColor public_oe static_oe property

public static Color SectionColor
Résultat Color

SuccessColor public_oe static_oe property

public static Color SuccessColor
Résultat Color

WarningColor public_oe static_oe property

public static Color WarningColor
Résultat Color