Class ControlPlayableAsset | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ControlPlayableAsset

    Playable Asset that generates playables for controlling time-related elements on a GameObject.

    Inheritance
    System.Object
    ControlPlayableAsset
    Namespace: UnityEngine.Timeline
    Syntax
    [Serializable]
    public class ControlPlayableAsset : PlayableAsset, IPropertyPreview, ITimelineClipAsset

    Fields

    active

    Indicate whether GameObject activation is controlled

    Declaration
    public bool active
    Field Value
    Type Description
    System.Boolean

    particleRandomSeed

    Random seed to supply particle systems that are set to use autoRandomSeed

    Declaration
    public uint particleRandomSeed
    Field Value
    Type Description
    System.UInt32
    Remarks

    This is used to maintain determinism when playing back in timeline. Sub emitters will be assigned incrementing random seeds to maintain determinism and distinction.

    postPlayback

    Indicates the active state of the GameObject when Timeline is stopped.

    Declaration
    public ActivationControlPlayable.PostPlaybackState postPlayback
    Field Value
    Type Description
    ActivationControlPlayable.PostPlaybackState

    prefabGameObject

    Prefab object that will be instantiated.

    Declaration
    public GameObject prefabGameObject
    Field Value
    Type Description
    GameObject

    searchHierarchy

    Indicates whether to search the entire hierarchy for controllable components.

    Declaration
    public bool searchHierarchy
    Field Value
    Type Description
    System.Boolean

    sourceGameObject

    GameObject in the scene to control, or the parent of the instantiated prefab.

    Declaration
    public ExposedReference<GameObject> sourceGameObject
    Field Value
    Type Description
    ExposedReference<GameObject>

    updateDirector

    Indicates whether playableDirectors are controlled.

    Declaration
    public bool updateDirector
    Field Value
    Type Description
    System.Boolean

    updateITimeControl

    Indicates whether Monobehaviours implementing ITimeControl will be controlled.

    Declaration
    public bool updateITimeControl
    Field Value
    Type Description
    System.Boolean

    updateParticle

    Indicates whether Particle Systems will be controlled.

    Declaration
    public bool updateParticle
    Field Value
    Type Description
    System.Boolean

    Properties

    clipCaps

    Returns the capabilities of TimelineClips that contain a ControlPlayableAsset

    Declaration
    public ClipCaps clipCaps { get; }
    Property Value
    Type Description
    ClipCaps
    Implements
    ITimelineClipAsset.clipCaps

    duration

    Returns the duration in seconds needed to play the underlying director or particle system exactly once.

    Declaration
    public override double duration { get; }
    Property Value
    Type Description
    System.Double

    Methods

    CreatePlayable(PlayableGraph, GameObject)

    Creates the root of a Playable subgraph to control the contents of the game object.

    Declaration
    public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
    Parameters
    Type Name Description
    PlayableGraph graph

    PlayableGraph that will own the playable

    GameObject go

    The GameObject that triggered the graph build

    Returns
    Type Description
    Playable

    The root playable of the subgraph

    GatherProperties(PlayableDirector, IPropertyCollector)

    Called by the Timeline Editor to gather properties requiring preview.

    Declaration
    public void GatherProperties(PlayableDirector director, IPropertyCollector driver)
    Parameters
    Type Name Description
    PlayableDirector director

    The PlayableDirector invoking the preview

    IPropertyCollector driver

    PropertyCollector used to gather previewable properties

    Implements
    IPropertyPreview.GatherProperties(PlayableDirector, IPropertyCollector)

    OnEnable()

    This function is called when the object is loaded.

    Declaration
    public void OnEnable()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023