docs.unity3d.com
    Show / Hide Table of Contents

    Class BaseInteractionEditor

    Base class for custom editors in the XR Interaction Toolkit.

    Inheritance
    Object
    BaseInteractionEditor
    DeviceBasedSnapTurnProviderEditor
    XRBaseControllerEditor
    XRBaseInteractableEditor
    XRBaseInteractorEditor
    XRControllerRecordingEditor
    XRInteractorLineVisualEditor
    XRRigEditor
    Namespace: UnityEditor.XR.Interaction.Toolkit
    Syntax
    public abstract class BaseInteractionEditor : Editor

    Properties

    knownSerializedPropertyNames

    The names of all fields defined in the (including derived types).

    Declaration
    protected string[] knownSerializedPropertyNames { get; set; }
    Property Value
    Type Description
    String[]
    See Also
    InitializeKnownSerializedPropertyNames()

    Methods

    DrawDerivedProperties()

    This method is automatically called by DrawInspector() to draw the property fields of derived classes that are not explicitly defined in the .

    Declaration
    protected virtual void DrawDerivedProperties()
    Remarks

    This method is used to allow users to add a to a derived behavior and have it automatically appear in the Inspector while still having the custom Editor apply to that derived class.
    When a derived class adds a , it will no longer automatically be drawn by this method. This is to allow users to customize where the property is drawn in the Inspector window. The derived class does not need to explicitly add the if the user is fine with the default location of where it will be drawn.

    See Also
    InitializeKnownSerializedPropertyNames()

    DrawInspector()

    This method is automatically called by OnInspectorGUI() to draw the custom inspector. Override this method to customize the inspector as a whole.

    Declaration
    protected abstract void DrawInspector()

    DrawScript()

    Draw the standard read-only Script property.

    Declaration
    protected virtual void DrawScript()

    GetDerivedSerializedPropertyNames()

    Returns a list containing the names of all fields defined in the (including derived types).

    Declaration
    protected virtual List<string> GetDerivedSerializedPropertyNames()
    Returns
    Type Description
    List<String>

    Returns a list of strings with property names.

    InitializeKnownSerializedPropertyNames()

    This method is automatically called by OnInspectorGUI() to initialize knownSerializedPropertyNames if necessary. This is used together with DrawDerivedProperties() to draw all unknown serialized fields from derived classes.

    Declaration
    protected virtual void InitializeKnownSerializedPropertyNames()
    See Also
    DrawDerivedProperties()

    OnInspectorGUI()

    Declaration
    public override void OnInspectorGUI()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023