docs.unity3d.com
    Show / Hide Table of Contents

    Class EventInspectorUtils

    Inheritance
    Object
    EventInspectorUtils
    Namespace: UnityEditor.MARS
    Syntax
    [MovedFrom("Unity.MARS")]
    public static class EventInspectorUtils

    Methods

    GetEvents(Type, List<FieldInfo>)

    Collect FieldInfo for fields marked with EventAttribute

    Declaration
    public static void GetEvents(Type type, List<FieldInfo> fields)
    Parameters
    Type Name Description
    Type type

    The type from which fields will be collected

    List<FieldInfo> fields

    An empty list to which fields will be appended

    GetPersistentEventGreatestCount(UnityEventBase[])

    Returns the largest persistent event count from events array.

    Declaration
    public static int GetPersistentEventGreatestCount(this UnityEventBase[] unityEvents)
    Parameters
    Type Name Description
    UnityEventBase[] unityEvents

    UnityEvents we are getting the persistent count of.

    Returns
    Type Description
    Int32

    Largest persistent event count from UnityEvents array.

    OnEventDrawerGUI(SerializedObject, Dictionary<FieldInfo, EventInspectorData>)

    Draws the visible events area.

    Declaration
    public static void OnEventDrawerGUI(SerializedObject serializedObject, Dictionary<FieldInfo, EventInspectorData> eventInspectorData)
    Parameters
    Type Name Description
    SerializedObject serializedObject

    Serialized Object from inspector.

    Dictionary<FieldInfo, EventInspectorData> eventInspectorData

    Collection of data needed to draw and manage custom event inspectors.

    SyncEventDrawers(SerializedObject, Dictionary<FieldInfo, EventInspectorData>)

    Determines what events are displayed and when not displayed removes the listeners.

    Declaration
    public static void SyncEventDrawers(SerializedObject serializedObject, Dictionary<FieldInfo, EventInspectorData> eventInspectorData)
    Parameters
    Type Name Description
    SerializedObject serializedObject

    Serialized Object from inspector.

    Dictionary<FieldInfo, EventInspectorData> eventInspectorData

    Collection of data needed to draw and manage custom event inspectors.

    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