Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Is it possible to create more than one type of clip for a Track ?

Discussion in 'Timeline' started by Kiupe, Aug 31, 2017.

  1. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hello,

    I'm trying to create custom track in order to be able to access a custom Monobehavior and call methods on it. Using the wizard it's pretty easy to create a custom Track that will accept the behavior or create it when dragging an object onto it. But then, only one kind of clip will be available. So it seems that I have to create as much custom tracks as the number of methods I need to call in my custom Monobehavior.

    Am'I right ? If not, how can I create multiple clip for a specific track ?

    Thanks
     
  2. Drapan

    Drapan

    Joined:
    Apr 9, 2013
    Posts:
    14
    The built in animation track seems to do it by implementing multiple TrackClipType attributes, it seems like it should be as easy to just add another as is done by AnimationTrack, but doesn't seem to work. Is multiple clip types not supported on custom tracks?
     
  3. julienb

    julienb

    Unity Technologies

    Joined:
    Sep 9, 2016
    Posts:
    174
    Right now, multiple custom clips types per track is not supported. It is in our backlog though, so stay tuned!
     
  4. Drapan

    Drapan

    Joined:
    Apr 9, 2013
    Posts:
    14
    Does the same apply to subtracks? Had a peek at how override tracks are created for animation, and it seems that SupportsChildTracksAttribute is internal. Is there another solution available?
     
  5. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    795
    Hi @julienb , did that change in the last 3 years?
     
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Yes, multiple clip types are now supported on tracks. Or specify a base class and and child classes will be available to the track as well.

    Tracks can now implement ILayerable if they support child tracks.
     
    LazloBonin likes this.
  7. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    795
    Great, thanks! :)