Class LiveLink<T>
Live link is used by a device to set the properties of an actor.
Namespace: Unity.LiveCapture
Syntax
public abstract class LiveLink<T> : object, ILiveLink where T : struct, IAnimationJob
Type Parameters
Name | Description |
---|---|
T | The animation job used to apply the animated properties. |
Remarks
The playable API is used to create a playable that uses an animation job to sets an actor's properties, which it injects as an output on a playable graph. This allows using a timeline to drive some or all of the actor's properties without needing to modify the timeline asset.
Methods
Build(PlayableGraph)
Rebuilds the live link using the specified PlayableGraph.
Declaration
public void Build(PlayableGraph graph)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The PlayableGraph to drive the live link from. |
Implements
CreateAnimationJob(Animator)
Called to create the animation job used to output a take to the actor via the animator.
Declaration
protected abstract T CreateAnimationJob(Animator animator)
Parameters
Type | Name | Description |
---|---|---|
Animator | animator | The animator the job must output to. |
Returns
Type | Description |
---|---|
T | The new job. |
GetAnimator()
Gets the animator the live link outputs to.
Declaration
public Animator GetAnimator()
Returns
Type | Description |
---|---|
Animator | The animator component. |
Implements
IsActive()
Gets if the live link is configured to output to the actor's properties.
Declaration
public bool IsActive()
Returns
Type | Description |
---|---|
Boolean | True if output is enabled; false otherwise. |
Implements
IsValid()
Checks if the playables driving the live link are valid.
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
Boolean | true if valid; otherwise, false. |
Implements
SetActive(Boolean)
Sets if the live link outputs to the actor's properties.
Declaration
public void SetActive(bool value)
Parameters
Type | Name | Description |
---|---|---|
Boolean | value | True to enable output; false to disable output. |
Implements
SetAnimator(Animator)
Sets the animator the live link outputs to.
Declaration
public void SetAnimator(Animator animator)
Parameters
Type | Name | Description |
---|---|---|
Animator | animator | The animator to use, or null to clear the assigned animator. |
Implements
Update()
Updates the live link output.
Declaration
public void Update()
Implements
Update(T)
Called to update the contents of the animation job from the current take evaluation.
Declaration
protected abstract T Update(T jobData)
Parameters
Type | Name | Description |
---|---|---|
T | jobData | The animation job to update. |
Returns
Type | Description |
---|---|
T | The updated job. |