Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

How to change the Bindings from the PlayableDirector/Timeline?

Discussion in 'Timeline' started by DragonDark99, Oct 16, 2018.

  1. DragonDark99

    DragonDark99

    Joined:
    Jun 6, 2017
    Posts:
    11
    Hello. I want to change the bindings from the PlayableDirector to make a cinematic where the player play some animations but the player model can be changed. for example a Cube move around an object in the Timeline. I want to change this Cube for a Sphere but without modify anything from the Timeline except the Cube via script. how I can made this?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Use TimelineAsset.GetOutputTracks() to find your specific track you want to bind (by name can work). Then pass that to playableDirector.SetGenericBinding(track, sphere.GetComponent<Animator>()). Then Play the playableDirector.

    The timeline asset is a fixed asset. It doesn't know what it is bound to. The playable director stores what is bound to which track. So the same timeline can be played on different playable directors, with different bindings.
     
    senkal_ and DragonDark99 like this.
  3. DragonDark99

    DragonDark99

    Joined:
    Jun 6, 2017
    Posts:
    11
    Thank You!