docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LiveStream

    A container that manages a collection of properties in order to animate an actor in the scene using live data and record its performance into a clip.

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

    Properties

    FrameRate

    The frame-rate to use for recording.

    Declaration
    public FrameRate FrameRate { get; }
    Property Value
    Type Description
    FrameRate

    Root

    The root transform to bind the animated properties to.

    Declaration
    public Transform Root { get; }
    Property Value
    Type Description
    Transform

    Methods

    CreateProperty<TComponent, TValue>(string, string, Action<TComponent, TValue>)

    Creates a property from the specified binding information.

    Declaration
    public LivePropertyHandle CreateProperty<TComponent, TValue>(string relativePath, string propertyName, Action<TComponent, TValue> setter = null) where TComponent : Component where TValue : struct
    Parameters
    Type Name Description
    string relativePath

    The path from the root transform where the component to bind to is.

    string propertyName

    The name of the property to bind to.

    Action<TComponent, TValue> setter

    The action that sets the value to the component's property. This is needed for some builtin components where the property can't be set using reflection.

    Returns
    Type Description
    LivePropertyHandle

    A LivePropertyHandle representing the property.

    Type Parameters
    Name Description
    TComponent

    The type of the component to bind to.

    TValue

    The type of the data to bind to.

    IsHandleValid(LivePropertyHandle)

    Checks if the specified property is managed by this stream.

    Declaration
    public bool IsHandleValid(LivePropertyHandle handle)
    Parameters
    Type Name Description
    LivePropertyHandle handle

    The LivePropertyHandle representing the property.

    Returns
    Type Description
    bool

    true if the handle is valid; otherwise, false.

    Rebind()

    Attempts to find all the target components from the root. Call this method if the hierarcy of the root changes.

    Declaration
    public void Rebind()

    Rebind(Transform)

    Attempts to find all the target components from the specified root. Call this method to change the animated hierarchy.

    Declaration
    public void Rebind(Transform root)
    Parameters
    Type Name Description
    Transform root

    The root of the hierarchy to animate.

    RemoveProperty(LivePropertyHandle)

    Removes a property from the stream.

    Declaration
    public void RemoveProperty(LivePropertyHandle handle)
    Parameters
    Type Name Description
    LivePropertyHandle handle

    The LivePropertyHandle representing the property.

    SetFrameRate(FrameRate)

    Sets the frame-rate to use for recording.

    Declaration
    public void SetFrameRate(FrameRate frameRate)
    Parameters
    Type Name Description
    FrameRate frameRate

    The frame-rate to use for recording.

    TryGetHandle(PropertyBinding, out LivePropertyHandle)

    Attemps to retrieve an already created property from the stream.

    Declaration
    public bool TryGetHandle(PropertyBinding binding, out LivePropertyHandle handle)
    Parameters
    Type Name Description
    PropertyBinding binding

    The PropertyBinding of the property.

    LivePropertyHandle handle

    The returned property handle instance, or default if the property handle was not found.

    Returns
    Type Description
    bool

    true if the property handle was found, otherwise, false.

    Extension Methods

    LiveStreamExtensions.CreateProperty<TComponent, TValue>(LiveStream, string, Action<TComponent, TValue>)
    LiveStreamExtensions.SetLive(LiveStream, LivePropertyHandle, bool)
    LiveStreamExtensions.SetMaxError(LiveStream, LivePropertyHandle, float)
    LiveStreamExtensions.SetValue<TValue>(LiveStream, LivePropertyHandle, in TValue)
    LiveStreamExtensions.TryGetHandle(LiveStream, string, string, Type, out LivePropertyHandle)
    LiveStreamExtensions.TryGetHandle(LiveStream, string, Type, out LivePropertyHandle)
    LiveStreamExtensions.TryGetValue<TValue>(LiveStream, LivePropertyHandle, out TValue)
    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)