docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EventInspectorUtils

    Collection of editor tools for drawing and using EventInspectorData

    Inheritance
    object
    EventInspectorUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.MARS
    Assembly: Unity.MARS.Editor.dll
    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
    int

    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)