docs.unity.cn
    Show / Hide Table of Contents

    Class ActorSystem

    Inheritance
    Object
    ActorSystem
    Namespace: Unity.Reflect.Actor
    Syntax
    public class ActorSystem

    Constructors

    ActorSystem(Scheduler)

    Declaration
    public ActorSystem(Scheduler scheduler)
    Parameters
    Type Name Description
    Scheduler scheduler

    Fields

    RefToComponents

    Small hack to track components not referenced directly by actors so the GC does not collect them. This will be removed in the future when a common base class can be inherited (ReflectActor) instead of IActor and IAsyncActor

    Declaration
    public Dictionary<ActorRef, Dictionary<Type, object>> RefToComponents
    Field Value
    Type Description
    Dictionary<ActorRef, Dictionary<Type, Object>>

    Properties

    Dependencies

    Declaration
    public Dictionary<Type, object> Dependencies { set; }
    Property Value
    Type Description
    Dictionary<Type, Object>

    Token

    Declaration
    public CancellationToken Token { get; }
    Property Value
    Type Description
    CancellationToken

    Methods

    Add<TState>(Actor<TState>, Dictionary<Type, Object>)

    Declaration
    public void Add<TState>(Actor<TState> actor, Dictionary<Type, object> components)
        where TState : class
    Parameters
    Type Name Description
    Actor<TState> actor
    Dictionary<Type, Object> components
    Type Parameters
    Name Description
    TState

    DisposeDependencies()

    Declaration
    public void DisposeDependencies()

    FindActorState<TState>()

    Find the first matching actor for type and return its internal state, which is the class type of the actor or a custom type for deeply customized actor flow.

    Declaration
    public TState FindActorState<TState>()
        where TState : class
    Returns
    Type Description
    TState
    Type Parameters
    Name Description
    TState

    Remove(ActorRef)

    Declaration
    public void Remove(ActorRef actorRef)
    Parameters
    Type Name Description
    ActorRef actorRef

    Shutdown()

    Declaration
    public void Shutdown()

    Start()

    Declaration
    public void Start()

    Stop()

    Declaration
    public void Stop()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 26 April 2021