Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

I have a question about the usage of "Timeline"

Discussion in 'Timeline' started by cdytoby, Jul 24, 2017.

  1. cdytoby


    Nov 19, 2014
    I never used Playables and Timelines in previous version. And I just tried the feature. I have a question about the functionality:

    Is this "Playable" designed to "help create an Animator" or it's a replacement for "Animator"? All the tutorials showed that this feature is similar to Animator.

    And, If I want to achieve level design like "at 2 second point show this enemy" and "at 10 second point show a bird fly through sky" these stuff, should I use "Playable" system or just write my own code in Update?

    One more thing: can I generate a "Timeline" at runtime? For example I get a json from internet, and I create/generate my own timeline according to my json string, during runtime.
  2. seant_unity


    Unity Technologies

    Aug 25, 2015
    Playables are what are used to create an animation state machine under the hood. So it's not a replacement for Animator, but more like an API to build your own blend trees. The animator is what plays them. Timeline uses animation playables to build a (sub) graph and uses the animator to play it.

    Either Update or Playables will work, it very much depends on what else you are trying to do. For the example you mention, Update sounds like should work just fine. Timeline may work as well, if everything is meant to be synchronized.

    And yes, there is an API to create Timelines at runtime, so you could read a JSON and create and play a timeline.