docs.unity3d.com
    目次を表示する/隠す

    Class TimedDataSourceManager

    A singleton class that keeps track of ITimedDataSource instances.

    Inheritance
    Object
    TimedDataSourceManager
    Namespace: Unity.LiveCapture
    Syntax
    public sealed class TimedDataSourceManager : IEnumerable<ITimedDataSource>, IEnumerable

    Properties

    Entries

    Gets the list of registered sources.

    Declaration
    public IReadOnlyList<ITimedDataSource> Entries { get; }
    Property Value
    Type Description
    IReadOnlyList<ITimedDataSource>

    Instance

    The TimedDataSourceManager instance.

    Declaration
    public static TimedDataSourceManager Instance { get; }
    Property Value
    Type Description
    TimedDataSourceManager

    Item[String]

    Gets the ITimedDataSource with the specified ID.

    Declaration
    public ITimedDataSource this[string id] { get; }
    Parameters
    Type Name Description
    String id

    The ID of the source to get.

    Property Value
    Type Description
    ITimedDataSource

    The source, or null if none with the given ID are registered.

    Methods

    Clear()

    Unregister all sources.

    Declaration
    public void Clear()

    EnsureIdIsValid(ref String)

    Creates a new ID if the given ID is uninitialized or is already used.

    Declaration
    public bool EnsureIdIsValid(ref string id)
    Parameters
    Type Name Description
    String id

    The ID to initialize.

    Returns
    Type Description
    Boolean

    true if a new ID was generated; false otherwise.

    GetEnumerator()

    Gets an enumerator that iterates over all registered sources.

    Declaration
    public IEnumerator<ITimedDataSource> GetEnumerator()
    Returns
    Type Description
    IEnumerator<ITimedDataSource>

    An enumerator for the collection.

    Register(ITimedDataSource)

    Adds a ITimedDataSource to the registry.

    Declaration
    public bool Register(ITimedDataSource source)
    Parameters
    Type Name Description
    ITimedDataSource source

    The source to register.

    Returns
    Type Description
    Boolean

    true if the source was registered successfully, false if source is null, the source's ID is null or empty, or another source was already registered with the same ID.

    Unregister(ITimedDataSource)

    Removes a ITimedDataSource from the registry.

    Declaration
    public bool Unregister(ITimedDataSource source)
    Parameters
    Type Name Description
    ITimedDataSource source

    The source to unregister.

    Returns
    Type Description
    Boolean

    true if the source was unregistered successfully, false if source didn't exist in the registry.

    Events

    Added

    An event triggered when a new source is registered.

    Declaration
    public event Action<ITimedDataSource> Added
    Event Type
    Type Description
    Action<ITimedDataSource>

    Removed

    An event triggered when a source is unregistered.

    Declaration
    public event Action<ITimedDataSource> Removed
    Event Type
    Type Description
    Action<ITimedDataSource>
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)