Class EditorAnalyticsEvent<T>
Base class for editor analytics events.
Inherited Members
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
See Also
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
EventVersion
The event/table version.
Declaration
public int EventVersion { get; }
Property Value
Type | Description |
---|---|
int |
See Also
Registered
Declaration
public bool Registered { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
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
RegisterWithAnalyticsServer()
The implementation to register this event with the analytics server.
Declaration
protected abstract AnalyticsResult RegisterWithAnalyticsServer()
Returns
Type | Description |
---|---|
Analytics |
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
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
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 |
---|---|
Analytics |
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.