Search Unity

Timeline AudioTrack features for custom Playables

Discussion in 'Timeline' started by fxlange, May 24, 2018.

  1. fxlange

    fxlange

    Joined:
    Dec 20, 2016
    Posts:
    45
    Hi there,

    I'm getting more and more into custom scripting for Timeline which is a lot of fun but can't figure out how to implement some of the Audio and Animation Track behaviours for my own custom Tracks/Clips. I couldn't find anything related to this in DefaultPlayables nor the documentation.

    For example:
    • Adding Clips From a Source like "Add from Audio Clip" or "Add from Animation Clip"
    • Visualizing Clip Data directly on the Clip in the Timeline Window (not in the inspector) like the AudioClip Wave
    • Looping by increasing the clip duration beyond the duration of the "source" and the context menu options related to this like Editing/Match Duration
    • Custom Context Menu Actions for Clips in general
    Any hints / tips / directions are very much appreciated. Or are these features not part of the current Timeline API? But maybe planed? I saw a post that creating clips from dragging objects onto tracks will be part of the API in the 2018.2 release - which at least sounds similar to my first point.

    Thanks,
    Felix
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Yes, in 2018.2, if your custom asset has an exposed reference or object reference, then drag and drop will work automatically.

    For looping, if you override the duration property of the playable asset, and supply Looping as part of your ClipCaps (make your clip playable asset implement ITimelineClipAsset), then you can get the same looping visuals as audio/animation clips.

    As for clips drawing and context menus, there is currently no public APIs for that.
     
  3. fxlange

    fxlange

    Joined:
    Dec 20, 2016
    Posts:
    45
    Thanks a lot @seant_unity, will try out directly.

    This means that it is also not planed at the moment right?
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    It is. We have plans for improving Timeline's customization, but it's not scheduled for at least a couple more releases.
     
  5. fxlange

    fxlange

    Joined:
    Dec 20, 2016
    Posts:
    45
    Okay, thanks.

    Actually, overriding the duration property was the missing piece for me and kind of solves all my questions/issues at once (not just the looping). I would vote for including this in one of the DefaultPlayables as it enables a lot of already built in context informations.