Class BaseMixedRealityProfileInspector
Base class for all BaseMixedRealityProfile Inspectors to inherit from.
Inheritance
Namespace: Microsoft.MixedReality.Toolkit.Editor
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseMixedRealityProfileInspector : UnityEditor.Editor
Methods
IsProfileLock(BaseMixedRealityProfile)
Checks if the profile is locked
Declaration
protected static bool IsProfileLock(BaseMixedRealityProfile profile)
Parameters
Type | Name | Description |
---|---|---|
BaseMixedRealityProfile | profile |
Returns
Type | Description |
---|---|
Boolean |
IsProfileRequired(Type)
Inspect the attributes of the provided type to determine if a configuration profile is required.
Declaration
protected static bool IsProfileRequired(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type representing the service. |
Returns
Type | Description |
---|---|
Boolean | True if the type is decorated with an attribute indicating a profile is required, false otherwise. |
IsProfileRequired(SystemType)
Inspect the attributes of the provided system type to determine if a configuration profile is required.
Declaration
protected static bool IsProfileRequired(SystemType serviceType)
Parameters
Type | Name | Description |
---|---|---|
SystemType | serviceType | The system type representing the service. |
Returns
Type | Description |
---|---|
Boolean | True if the service is decorated with an attribute indicating a profile is required, false otherwise. |
OnEnable()
Declaration
protected virtual void OnEnable()
RenderFoldout(ref Boolean, String, Action, String)
Render Bold/HelpBox style Foldout
Declaration
protected static void RenderFoldout(ref bool currentState, string title, Action renderContent, string preferenceKey = null)
Parameters
Type | Name | Description |
---|---|---|
Boolean | currentState | reference bool for current visibility state of foldout |
String | title | Title in foldout |
Action | renderContent | code to execute to render inside of foldout |
String | preferenceKey | optional argument, current show/hide state will be tracked associated with provided preference key |
RenderProfile(SerializedProperty, Type, Boolean, Boolean, Type)
Renders a BaseMixedRealityProfile.
Declaration
protected static bool RenderProfile(SerializedProperty property, Type profileType, bool showCloneButton = true, bool renderProfileInBox = false, Type serviceType = null)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property | the BaseMixedRealityProfile property. |
Type | profileType | Profile type to filter available values to set on the provided property. If null, defaults to type BaseMixedRealityProfile |
Boolean | showCloneButton | If true, draw the clone button, if false, don't |
Boolean | renderProfileInBox | if true, render box around profile content, if false, don't |
Type | serviceType | Optional service type to limit available profile types. |
Returns
Type | Description |
---|---|
Boolean | True, if the profile changed. |
RenderReadOnlyProfile(SerializedProperty)
Renders a non-editable object field and an editable dropdown of a profile.
Declaration
public static void RenderReadOnlyProfile(SerializedProperty property)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property |