Information on integrating with Timeline needed

Timeline - awesome feature. So it can play audio clips. Cool, but not useful to me and other audio middleware users. Because for starters you can’t play 1 of 4 variations at random, or with randomized pitch or with custom fading and a lot of other things.

Anyway what I am wanting to know is how does one write a script that can be used on Timeline? Does any old Monobehavior just work? Or does the script need to be a subclass of a certain class with certain events in it, like the scripts you can write for Mechanim?

Or can I just call static methods on any script in the Hierarchy?

If it’s fairly simple, I would love to add Timeline support for all our plugins.

Thank you for any information!

Tough question to give a simple answer to!

Timeline is extendable. You can create your own clips and tracks types using the Playable system. Timeline itself it the first application of Playables beyond Animation.

The general idea is you write Scriptable Objects that represent the data of your clips and tracks, and write Playables that handle the runtime processing (think of them as instances of your data + processing algorithms). I’ve attached a sample if you want to have a look.

We have documentation coming to help with this, but because you want to extend Audio, it’s slightly more complicated because the Audio in timeline uses scheduled playback, which means it’s handled differently than other clip/playable types.

3113560–235459–SubtitleExample.unitypackage (6.82 KB)

Thanks for the response. I will try to integrate and see what happens!