Show / Hide Table of Contents

    Class Controller

    Configurable and startable controller.

    Inheritance
    Object
    Controller
    ArucoCamera
    ArucoCameraController
    Implements
    IController
    Namespace: ArucoUnity
    Assembly: Assembly-CSharp.dll
    Syntax
    public abstract class Controller : MonoBehaviour, IController
    Remarks

    It can have other configurable controllers as dependencies. They must have started before starting this controller. They stop this controller when one of them stops.

    Properties

    | Improve this Doc View Source

    AutoStart

    Gets or sets if configuring and starting automatically when when all dependencies started. Manually configure and start by calling Configure() and StartController().

    Declaration
    public bool AutoStart { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsConfigured

    Gets if the controller is configured.

    Declaration
    public bool IsConfigured { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsReady

    Gets if the controller is ready to be started when all dependencies have started.

    Declaration
    public bool IsReady { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsStarted

    Gets if the controller is started.

    Declaration
    public bool IsStarted { get; }
    Property Value
    Type Description
    Boolean

    Methods

    | Improve this Doc View Source

    AddDependency(IController)

    Add a new dependency. The controller must be stopped.

    Declaration
    public void AddDependency(IController dependency)
    Parameters
    Type Name Description
    IController dependency

    The dependency to add.

    | Improve this Doc View Source

    Awake()

    Initializes the properties.

    Declaration
    protected virtual void Awake()
    | Improve this Doc View Source

    Configure()

    Configures the controller and calls the Configured event. Properties must be set and the controller must be stopped.

    Declaration
    public void Configure()
    | Improve this Doc View Source

    Configuring()

    Declaration
    protected virtual void Configuring()
    | Improve this Doc View Source

    GetDependencies()

    Gets the list of the dependencies.

    Declaration
    public List<IController> GetDependencies()
    Returns
    Type Description
    List<IController>

    The list of the dependencies of this instance.

    | Improve this Doc View Source

    OnConfigured()

    Sets IsConfigured to true, calls Configured and if all dependencies started calls ArucoUnity.Controller.OnReady.

    Declaration
    protected virtual void OnConfigured()
    | Improve this Doc View Source

    OnDestroy()

    Calls StopController() if it has been configured and started.

    Declaration
    protected virtual void OnDestroy()
    | Improve this Doc View Source

    OnStarted()

    Sets IsStarted to true and calls Started.

    Declaration
    protected virtual void OnStarted()
    | Improve this Doc View Source

    OnStopped()

    Sets IsStarted to false and calls Stopped.

    Declaration
    protected virtual void OnStopped()
    | Improve this Doc View Source

    RemoveDependency(IController)

    Remove a dependency. The controller must be stopped.

    Declaration
    public void RemoveDependency(IController dependency)
    Parameters
    Type Name Description
    IController dependency

    The dependency to remove.

    | Improve this Doc View Source

    Start()

    Calls ArucoUnity.Controller.SetAutoStart(System.Boolean).

    Declaration
    protected virtual void Start()
    | Improve this Doc View Source

    StartController()

    Starts the controller and calls the Started event. The controller must be configured, ready and stopped.

    Declaration
    public void StartController()
    | Improve this Doc View Source

    Starting()

    Declaration
    protected virtual void Starting()
    | Improve this Doc View Source

    StopController()

    Stops the controller and calls the Stopped event. The controller must be configured and started.

    Declaration
    public void StopController()
    | Improve this Doc View Source

    Stopping()

    Declaration
    protected virtual void Stopping()

    Events

    | Improve this Doc View Source

    Configured

    Called when the controller is configured.

    Declaration
    public event EventHandler Configured
    Event Type
    Type Description
    EventHandler
    | Improve this Doc View Source

    Ready

    Called when the controller is configured and ready to be started, when all its dependencies started.

    Declaration
    public event EventHandler Ready
    Event Type
    Type Description
    EventHandler
    | Improve this Doc View Source

    Started

    Called when the controller is started.

    Declaration
    public event EventHandler Started
    Event Type
    Type Description
    EventHandler
    | Improve this Doc View Source

    Stopped

    Called when the controller is stopped.

    Declaration
    public event EventHandler Stopped
    Event Type
    Type Description
    EventHandler

    Implements

    IController
    • Improve this Doc
    • View Source
    Back to top Aruco Unity - Erwan Normand