docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TimecodeSourceManager

    A singleton class that keeps track of ITimecodeSource instances.

    Inheritance
    object
    TimecodeSourceManager
    Namespace: Unity.LiveCapture
    Assembly: Unity.LiveCapture.dll
    Syntax
    public sealed class TimecodeSourceManager

    Properties

    Entries

    Gets the list of registered sources.

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

    Instance

    The TimecodeSourceManager instance.

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

    this[string]

    Gets the ITimecodeSource with the specified ID.

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

    The ID of the source to get.

    Property Value
    Type Description
    ITimecodeSource

    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
    bool

    true if a new ID was generated; false otherwise.

    GetEnumerator()

    Gets an enumerator that iterates over all registered sources.

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

    An enumerator for the collection.

    Register(ITimecodeSource)

    Adds a ITimecodeSource to the registry.

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

    The source to register.

    Returns
    Type Description
    bool

    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(ITimecodeSource)

    Removes a ITimecodeSource from the registry.

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

    The source to unregister.

    Returns
    Type Description
    bool

    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<ITimecodeSource> Added
    Event Type
    Type Description
    Action<ITimecodeSource>

    Removed

    An event triggered when a source is unregistered.

    Declaration
    public event Action<ITimecodeSource> Removed
    Event Type
    Type Description
    Action<ITimecodeSource>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)