docs.unity.cn
    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 © 2020 Unity Technologies
    Generated by DocFX
    on 26 April 2021