docs.unity3d.com
    Show / Hide Table of Contents

    Class EventComponent

    Inheritance
    Object
    EventComponent
    Namespace: Unity.Reflect.Actor
    Syntax
    [Component(null, typeof(EventInputAttribute), typeof(EventOutputAttribute), typeof(EventOutput<>), Multiplicity.Zero, Multiplicity.Zero, null, false)]
    public class EventComponent

    Constructors

    EventComponent(ActorRef, NetComponent)

    Declaration
    public EventComponent(ActorRef self, NetComponent net)
    Parameters
    Type Name Description
    ActorRef self
    NetComponent net

    Methods

    Broadcast<TData>(TData)

    Declaration
    public void Broadcast<TData>(TData evt)
        where TData : class
    Parameters
    Type Name Description
    TData evt
    Type Parameters
    Name Description
    TData

    Initialize(ActorRef)

    Declaration
    public void Initialize(ActorRef pubSubRef)
    Parameters
    Type Name Description
    ActorRef pubSubRef

    Subscribe<TData>(Action<EventContext<TData>>)

    Declaration
    public void Subscribe<TData>(Action<EventContext<TData>> action)
        where TData : class
    Parameters
    Type Name Description
    Action<EventContext<TData>> action
    Type Parameters
    Name Description
    TData

    Unsubscribe<TData>()

    Declaration
    public void Unsubscribe<TData>()
    Type Parameters
    Name Description
    TData
    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