docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EditorAnalyticsEvent<T>

    Base class for editor analytics events.

    Inheritance
    object
    EditorAnalyticsEvent<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.XR.CoreUtils.Editor.Analytics
    Assembly: Unity.XR.CoreUtils.Editor.dll
    Syntax
    public abstract class EditorAnalyticsEvent<T>
    Type Parameters
    Name Description
    T

    Constructors

    EditorAnalyticsEvent(string, int)

    The class constructor.

    Declaration
    public EditorAnalyticsEvent(string eventName, int eventVersion)
    Parameters
    Type Name Description
    string eventName

    This event name.

    int eventVersion

    This event version.

    See Also
    EditorAnalytics

    Properties

    EventName

    The event name determines which database table it goes into in the backend. All events which we want grouped into a table must share the same event name.

    Declaration
    public string EventName { get; }
    Property Value
    Type Description
    string
    See Also
    EditorAnalytics

    EventVersion

    The event/table version.

    Declaration
    public int EventVersion { get; }
    Property Value
    Type Description
    int
    See Also
    EditorAnalytics

    Registered

    Returns true if the event is already registered with Unity analytics API, otherwise returns false.

    Declaration
    public bool Registered { get; }
    Property Value
    Type Description
    bool
    See Also
    EditorAnalytics

    Methods

    Register()

    Register this event with the analytics server.

    Declaration
    public bool Register()
    Returns
    Type Description
    bool

    Returns whenever this event was successfully registered with the analytics server. Returns false if the user disabled analytics.

    See Also
    EditorAnalytics

    RegisterWithAnalyticsServer()

    The implementation to register this event with the analytics server.

    Declaration
    protected abstract AnalyticsResult RegisterWithAnalyticsServer()
    Returns
    Type Description
    AnalyticsResult

    The analytics result of the event registration.

    Remarks

    It's recommended to implement this method inside the package editor asmdef/DLL that owns this event. The editor analytics API may add its invocation info to the payload message.

    See Also
    EditorAnalytics

    Send(T)

    Send the given parameter as payload to the analytics server.

    Declaration
    public bool Send(T parameter)
    Parameters
    Type Name Description
    T parameter

    The parameter object within the event.

    Returns
    Type Description
    bool

    Returns whenever the event was successfully sent. Returns false if this event was not registered yet.

    See Also
    EditorAnalytics

    SendToAnalyticsServer(T)

    The implementation to send the given parameter as payload to the analytics server.

    Declaration
    protected abstract AnalyticsResult SendToAnalyticsServer(T parameter)
    Parameters
    Type Name Description
    T parameter

    The parameter to send.

    Returns
    Type Description
    AnalyticsResult

    The analytics result of the send invocation.

    Remarks

    It's recommended to implement this method inside the package editor asmdef/DLL that owns this event. The editor analytics API may add its invocation info to the payload message.

    See Also
    EditorAnalytics

    See Also

    EditorAnalytics
    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)