Search Unity

Extending Control playable track

Discussion in 'Timeline' started by sp-sergio-gil, Aug 19, 2019.

  1. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    I have some doubts about using Control tracks in timeline... for example we can set the prefab and it's spawned automatically, but how we can define the parent or initial position for this prefab?

    If the spawned prefab has a timeline, how we can access it to setup some values?

    Can we extend from the control track and add more information like parent/position for the spawned gameobject?

    Can the control track be tested in editor? in my case is not spawning anything... in runtime it does

    Sergi
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    If you set the prefab field on a control track clip, you can also set the Source Object Field (which will be renamed to ParentObject in the inspector). The prefab will be spawned as a child of that object. This lets you use proxy gameObjects to do positioning in the scene.

    Double click on the control track and you can edit the child timeline in context.

    Not really, but all the playables it uses are available in the public API, and you can use them to create your own control track variations. As of 2019.2, you can even make custom clips that tell the editor they control a subtimeline, so you can have the 'dig-in' style functionality on double click mentioned above.

    In editor, it still spawns, but the spawned object is hidden in the hierarchy window. It should appear in the scene, if it has a renderer.
     
  3. sp-sergio-gil

    sp-sergio-gil

    Joined:
    Mar 5, 2014
    Posts:
    45
    This is true and it's working but if I do this I cannot access to the child timeline to setup movement from a position to another


    It's true but I would try to edit all this information from code... after changing information in the playables do I need to do a graph and child graph rebuild?

    I'm working in Unity 201.1.8f.. I will try this in Unity 2019.2

    perfect, it's working as you say