docs.unity.cn
    Show / Hide Table of Contents

    Class LiveLink<T>

    Live link is used by a device to set the properties of an actor.

    Inheritance
    Object
    LiveLink<T>
    Namespace: Unity.LiveCapture
    Syntax
    [Serializable]
    [Obsolete("Override LiveCaptureDevice.LiveUpdate to set properties to the actors in the scene.")]
    public abstract class LiveLink<T> : 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
    ILiveLink.Build(PlayableGraph)

    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
    ILiveLink.GetAnimator()

    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
    ILiveLink.IsActive()

    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
    ILiveLink.IsValid()

    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
    ILiveLink.SetActive(Boolean)

    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
    ILiveLink.SetAnimator(Animator)

    Update()

    Updates the live link output.

    Declaration
    public void Update()
    Implements
    ILiveLink.Update()

    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.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Friday, August 26, 2022
    Terms of use