docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IObservableEvent<T>

    Event-like object that triggers callbacks when they subscribe after the event already triggered.

    Namespace: Unity.Cloud.DataStreaming.Runtime
    Assembly: solution.dll
    Syntax
    public interface IObservableEvent<out T>
    Type Parameters
    Name Description
    T

    Methods

    Subscribe(Action<T>)

    Subscribes to the event. The action is executed immediately if not doing so would make the receiver be in an incoherent state. "Incoherent state" is implementation defined and can vary between different events.

    Declaration
    void Subscribe(Action<out T> action)
    Parameters
    Type Name Description
    Action<T> action

    The action invoked when the event triggers.

    Exceptions
    Type Condition
    ArgumentNullException

    action is null.

    Unsubscribe(Action<T>)

    Unsubscribes from the event.

    Declaration
    void Unsubscribe(Action<out T> action)
    Parameters
    Type Name Description
    Action<T> action

    The action to will no be longer invoked when the event triggers.

    In This Article
    Back to top
    Copyright © 2024 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)