日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    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>
    Back to top Generated by DocFX