releases/2.5.4mrtk_developmentreleases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

    Show / Hide Table of Contents

    Class InspectorFieldsExample

    Example of using InspectorFields attributes in a class to create custom inspectors This is on approach for building complex inspectors that need to be customized or the need to overcome lack of polymorphism support They provide a way to create one inspector for multiple classes Example: Create a MonoBehaviour or scriptable object with a custom inspector. The functionality or settings can be changed by assigning a custom script to the object Use InspectorFields to render the custom properties inside the custom script in the inspector When the app launches, copy the properties to the new instance of the script An example of this can be found in Interactables Receivers. Each Receiver is a custom class that renders their properties in the Interactables custom inspector

    Inheritance
    Object
    InspectorFieldsExample
    Namespace: Microsoft.MixedReality.Toolkit.Utilities.Editor
    Assembly: cs.temp.dll.dll
    Syntax
    public class InspectorFieldsExample : MonoBehaviour

    Fields

    ComponentIndex

    Declaration
    public int ComponentIndex
    Field Value
    Type Description
    Int32

    ComponentName

    Declaration
    public string ComponentName
    Field Value
    Type Description
    String

    ComponentOption

    Declaration
    public string ComponentOption
    Field Value
    Type Description
    String

    Enabled

    Declaration
    public bool Enabled
    Field Value
    Type Description
    Boolean

    Settings

    A holder for the InpsectorFields as a list The inspector will update these settings while in the editor

    Declaration
    public List<InspectorPropertySetting> Settings
    Field Value
    Type Description
    List<InspectorPropertySetting>
    In This Article
    • Fields
      • ComponentIndex
      • ComponentName
      • ComponentOption
      • Enabled
      • Settings
    Back to top Generated by DocFX