Class DiagnosticEventCollectorSingleton
Collects ResourceManager events and passed them on the registered event handlers. In editor play mode, events are passed directly to the ResourceManager profiler window. In player builds, events are sent to the editor via the EditorConnection API.
Inheritance
DiagnosticEventCollectorSingleton
Inherited Members
Namespace: UnityEngine.ResourceManagement.Diagnostics
Syntax
public class DiagnosticEventCollectorSingleton : ComponentSingleton<DiagnosticEventCollectorSingleton>
Properties
PlayerConnectionGuid
The guid used for the PlayerConnect messaging system.
Declaration
public static Guid PlayerConnectionGuid { get; }
Property Value
Type | Description |
---|---|
Guid |
Methods
GetGameObjectName()
Retrieves the name of the object.
Declaration
protected override string GetGameObjectName()
Returns
Type | Description |
---|---|
String | Returns the name of the object. |
Overrides
UnityEngine.ResourceManagement.Util.ComponentSingleton<UnityEngine.ResourceManagement.Diagnostics.DiagnosticEventCollectorSingleton>.GetGameObjectName()
PostEvent(DiagnosticEvent)
Send a DiagnosticEvent event to all registered handlers
Declaration
public void PostEvent(DiagnosticEvent diagnosticEvent)
Parameters
Type | Name | Description |
---|---|---|
DiagnosticEvent | diagnosticEvent | The event to send |
RegisterEventHandler(Action<DiagnosticEvent>, Boolean, Boolean)
Register for diagnostic events. If there is no collector, this will fail and return false.
Declaration
public static bool RegisterEventHandler(Action<DiagnosticEvent> handler, bool register, bool create)
Parameters
Type | Name | Description |
---|---|---|
Action<DiagnosticEvent> | handler | The handler method action. |
Boolean | register | Register or unregister. |
Boolean | create | If true, the event collector will be created if needed. |
Returns
Type | Description |
---|---|
Boolean | True if registered, false if not. |
UnregisterEventHandler(Action<DiagnosticEvent>)
Unregister event hander
Declaration
public void UnregisterEventHandler(Action<DiagnosticEvent> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<DiagnosticEvent> | handler | Method or delegate that will handle the events |