Hi, I have custom tracks/behaviours/assets, and would like to able to skip to the current clip based off in-game events. For example, if I have a 10 second clip, I would like to able to skip it by pressing the space key. It seems like the easiest way to do this, in theory, is to set the Playable Director's current time to the clip's end time, however, I can't seem to access TimelineClip from PlayableBehaviour. I understand I can access the TimelineClips from the TrackAsset, but there doesn't seem to be a straightforward or reliable way to match up the clips to assets or behaviors, or is there?
No there isn't. The workaround is copy the data you need (e.g. end time) in your CustomTrack.CreateTrackMixer() from each clip to it's custom clip type (clip.asset). Then in your CustomClip.CreatePlayable, pass the information to the behaviour after you create it.
Thanks, seant. Is it guaranteed that there is a 1-to-1 relationship between the clips and assets? ie. multiple clips won't reuse the same asset?
For the most part, yes. Unless you explicitly share assets then that's true. None of the built in tracks or samples do that.