C# Класс Microsoft.MixedReality.Toolkit.Utilities.Editor.MixedRealityInspectorUtility

This class has handy inspector utilities and functions.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetAllDerivedTypes ( AppDomain appDomain, Type aType ) : Type[]

Описание методов

AddMixedRealityToolkitToScene() публичный статический Метод

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
Результат void

AxisMoveHandle() публичный статический Метод

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.
Результат float

CenterOnMainWin() публичный статический Метод

Centers an editor window on the main display.
public static CenterOnMainWin ( EditorWindow window ) : void
window EditorWindow
Результат void

CheckMixedRealityConfigured() публичный статический Метод

Check and make sure we have a Mixed Reality Toolkit and an active profile.
public static CheckMixedRealityConfigured ( bool renderEditorElements = false ) : bool
renderEditorElements bool
Результат bool

CircleMoveHandle() публичный статический Метод

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.
Результат Vector3

DrawProfileDropDownList() публичный статический Метод

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
Результат bool

DrawProfileDropDownList() публичный статический Метод

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
Результат bool

DrawSubProfileEditor() публичный статический Метод

Draws an editor for a profile object.
public static DrawSubProfileEditor ( Object profileObject, bool renderProfileInBox ) : void
profileObject UnityEngine.Object
renderProfileInBox bool
Результат void

GetDefaultConfigProfile() публичный статический Метод

Returns the default config profile, if it exists.
public static GetDefaultConfigProfile ( ) : MixedRealityToolkitConfigurationProfile
Результат MixedRealityToolkitConfigurationProfile

GetDefaultConfigProfile() публичный статический Метод

Given a list of MixedRealityToolkitConfigurationProfile objects, returns the one that matches the default profile name.
public static GetDefaultConfigProfile ( Array allProfiles ) : MixedRealityToolkitConfigurationProfile
allProfiles Array
Результат MixedRealityToolkitConfigurationProfile

GetEditorMainWindowPos() публичный статический Метод

Found at https://answers.unity.com/questions/960413/editor-window-how-to-center-a-window.html
public static GetEditorMainWindowPos ( ) : Rect
Результат Rect

RenderMixedRealityToolkitLogo() публичный статический Метод

Render the Mixed Reality Toolkit Logo.
public static RenderMixedRealityToolkitLogo ( ) : void
Результат void

RotationHandle() публичный статический Метод

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.
Результат Quaternion

SphereMoveHandle() публичный статический Метод

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.
Результат Vector3

SquareMoveHandle() публичный статический Метод

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.
Результат Vector3

VectorHandle() публичный статический Метод

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.
Результат Vector3

Описание свойств

DarkColor публичное статическое свойство

public static Color DarkColor
Результат Color

DisabledColor публичное статическое свойство

public static Color DisabledColor
Результат Color

ErrorColor публичное статическое свойство

public static Color ErrorColor
Результат Color

HandleColorAxis публичное статическое свойство

public static Color HandleColorAxis
Результат Color

HandleColorCircle публичное статическое свойство

public static Color HandleColorCircle
Результат Color

HandleColorRotation публичное статическое свойство

public static Color HandleColorRotation
Результат Color

HandleColorSphere публичное статическое свойство

public static Color HandleColorSphere
Результат Color

HandleColorSquare публичное статическое свойство

public static Color HandleColorSquare
Результат Color

HandleColorTangent публичное статическое свойство

public static Color HandleColorTangent
Результат Color

LineVelocityColor публичное статическое свойство

public static Color LineVelocityColor
Результат Color

LogoDarkTheme публичное статическое свойство

public static Texture2D LogoDarkTheme
Результат Texture2D

LogoLightTheme публичное статическое свойство

public static Texture2D LogoLightTheme
Результат Texture2D

SectionColor публичное статическое свойство

public static Color SectionColor
Результат Color

SuccessColor публичное статическое свойство

public static Color SuccessColor
Результат Color

WarningColor публичное статическое свойство

public static Color WarningColor
Результат Color