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.
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 |
---|---|
Frame |
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 |
---|---|
Live |
A Live |
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 |
---|---|---|
Live |
handle | The Live |
Returns
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 |
---|---|---|
Live |
handle | The Live |
SetFrameRate(FrameRate)
Sets the frame-rate to use for recording.
Declaration
public void SetFrameRate(FrameRate frameRate)
Parameters
Type | Name | Description |
---|---|---|
Frame |
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 |
---|---|---|
Property |
binding | The Property |
Live |
handle | The returned property handle instance, or default if the property handle was not found. |