In version 2017.1 of Unity, we made a couple of changes to the Playables API in order to make it cleaner and easier to work with. However, it meant that custom playables, tracks and clips needed to be updated when transitioning from 5.6 to 2017.1.
I wrote a document to help with that transition. Most of the use cases should be covered. If anyone has any hurdles, don’t hesitate to ask for help
Hey, first of all, thank you so much to you and the team who put this all together, Timeline looks amazing so far!! I’m wondering about a few things though (I hope it’s not too much haha)
What’s the role of this method (below) in the TrackAsset class? If there’s documentation on this, that would help too public Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
In general, I’m kinda confused on what the PlayableGraph is for if there’s a Timeline, and what the inputs and outputs mean. I’m familiar with node-based data structures, but I’m not too sure what the PlayableGraph does.
What’s the difference between the types Playable and ScriptPlayable?
The change is very, very nice. I updated the PlayableGraphVisualizer to work in 2017, and I tried to also make it work for 5.6. I gave up. The 2017 version was no problem to make work. So great work on that!
@ModLunar , I’m using it where you’d normally use the AnimatorController. You’re pretty much free to create custom ways to author animation trees, which is great (the standard way to use the Animator is… not good".
CreateTrackMixer creates a playable that will act as a mixer for the track. The purpose of a mixer is to be able to blend multiple playables together (see https://docs.unity3d.com/2017.1/Documentation/Manual/Playables-Examples.html, section Creating an animation blend tree). In the case of timeline, a track mixer can also use a track’s bound object.
Check out the SubtitleMixer class from seant_unity’s Subtitle example. It will show you how to create and use a mixer.
In a PlayableGraph, an Output defines which system will be used to play the graph connected to it. For example, an Animation Output will use an Animator to play the animation.
With a Playable, an input is what is connected to the current playable, and an output is what the current playable is connected to.
I seem to remember having played a clip on a gameobject without an Animator in one iteration of Playables. Did that possibility get removed, is it still there, or am I just remembering something that wasn’t there?
We’ve found that Animators have a very, very large cpu overhead, even when they’re not doing anything (ie. “playing” a state with no clip). They’re also theoretically not required, since we’re not dealing with AnimatorControllers or parameters when using a playable graph.
In one of the talks at Unite Europe the speaker said the API would be changing for Timelines to make it simpler (not needing x5 classes?) … is there any idea of when this update will be released?
I realize this post is quite old, but I thought it might be worth answering anyhow.
You can play timelines just fine without an Animator, but you will probably want to remove the Animation Track that is automatically assigned when you create a timeline by selecting a GameObject and clicking “Create” on the Timeline editor. (As well as removing the Animator component created on the GameObject, of course).