Class DiagnosticEventCollector | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class DiagnosticEventCollector

    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
    System.Object
    DiagnosticEventCollector
    Namespace: UnityEngine.ResourceManagement.Diagnostics
    Syntax
    public class DiagnosticEventCollector : MonoBehaviour

    Properties

    EditorConnectionMessageId

    The message id used to register this class with the EditorConnection

    Declaration
    public static Guid EditorConnectionMessageId { get; }
    Property Value
    Type Description
    System.Guid

    Guid of message id

    ResourceManagerProfilerEventsEnabled

    Get or set whether ResourceManager events are enabled

    Declaration
    public static bool ResourceManagerProfilerEventsEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    Enabled state of profiler events

    Methods

    PostEvent(DiagnosticEvent)

    Send a DiagnosticEvent event to all registered handlers

    Declaration
    public static void PostEvent(DiagnosticEvent diagnosticEvent)
    Parameters
    Type Name Description
    DiagnosticEvent diagnosticEvent

    The event to send

    RegisterEventHandler(Action<DiagnosticEvent>)

    Register event handler

    Declaration
    public static void RegisterEventHandler(Action<DiagnosticEvent> handler)
    Parameters
    Type Name Description
    System.Action<DiagnosticEvent> handler

    Method or delegate that will handle the events

    UnregisterEventHandler(Action<DiagnosticEvent>)

    Unregister event hander

    Declaration
    public static void UnregisterEventHandler(Action<DiagnosticEvent> handler)
    Parameters
    Type Name Description
    System.Action<DiagnosticEvent> handler

    Method or delegate that will handle the events

    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