docs.unity3d.com
    Show / Hide Table of Contents

    Class NetComponent

    Inheritance
    Object
    NetComponent
    Namespace: Unity.Reflect.Actor
    Syntax
    [Component(null, typeof(NetInputAttribute), typeof(NetOutputAttribute), typeof(NetOutput<>), Multiplicity.Any, Multiplicity.OneOrMore, null, false)]
    public class NetComponent : IRunnableComponent

    Constructors

    NetComponent(ActorRef, Scheduler, Dictionary<ActorRef, NetComponent>)

    Declaration
    public NetComponent(ActorRef actorRef, Scheduler scheduler, Dictionary<ActorRef, NetComponent> actorSockets)
    Parameters
    Type Name Description
    ActorRef actorRef
    Scheduler scheduler
    Dictionary<ActorRef, NetComponent> actorSockets

    Methods

    Register<TData>(Action<NetContext<TData>>)

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

    RegisterOpenGeneric<TData>(Action<NetContext<TData>>)

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

    Send<TData>(List<ActorRef>, TData)

    If the same message is sent to many actors, make sure to use this call instead, as there may be some mechanisms tracking the generated message for pooling purpose.

    Declaration
    public void Send<TData>(List<ActorRef> destinations, TData data)
        where TData : class
    Parameters
    Type Name Description
    List<ActorRef> destinations
    TData data
    Type Parameters
    Name Description
    TData

    Send<TData>(ActorRef, TData)

    Declaration
    public void Send<TData>(ActorRef destination, TData data)
        where TData : class
    Parameters
    Type Name Description
    ActorRef destination
    TData data
    Type Parameters
    Name Description
    TData

    Tick(TimeSpan, CancellationToken)

    Declaration
    public bool Tick(TimeSpan endTime, CancellationToken token)
    Parameters
    Type Name Description
    TimeSpan endTime
    CancellationToken token
    Returns
    Type Description
    Boolean
    Implements
    IRunnableComponent.Tick(TimeSpan, CancellationToken)
    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