Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Question Custom Nested timeline, without GameObjects?

Discussion in 'Timeline' started by Sangemdoko, Apr 3, 2023.

  1. Sangemdoko


    Dec 15, 2013

    I'm trying to build a system with many timelines. I'm making custom tracks such that my tracks/clips can get references of things isnide my scene through my custom systems (without relying in unitys "exposed properties") This allows me to work on my timelines in any scene (or even multiple scene).

    Now I want to be able to nest timelines. The "default" approach is to use a control track. This takes the Playablebehaviour on a GameObject in the scene to deduce the timeline to play.

    But as described before I want to avoid any references to things inside the scene through exposed properties.
    Thankfully ControlTracks allow prefabs. so I can make a prefab with a PlayableBehaviour and use that.

    Two issues to that approach though.
    1) I have to create a prefab for every single TimelineAsset I plan to nest.. which seems completly unecessary
    2) I can't "open" the nested timeline by double clicking on it. Check how the GameObject refence in the top clip has an arrow and the one below which references the prefab does not:
    The one with the arrow allows me to double click on it to see the nested timeline.

    So my plan is to create a custom track/clip that takes in a TimelineAsset as input and it could dynamically create a gameobject with a playableBehaviour with the TimelineAsset assigned to it.
    The part I'm not sure about is how to allow to "open" the nested timeline by double clicking the way it works for gameobject references?

    Any advice would be welcomed?
  2. akent99


    Jan 14, 2018
    Have you looked at the Sequences package in Unity? I use the parts from it I like (not all of it). For example, it allows a "master sequence" to have references to "child sequences" (currently 3 deep, with a future release supporting arbitrary depth I believe). The parent sequences have clips referring to child sequences, so you can put the child sequences in a row.

    I am not sure it will meet your needs of not referring back to the scene hierarchy. I ended up navigating the hierarchy of timelines mainly using the scene hierarchy myself, then finding the timelines associated for each sub-sequence that way. But if you have not looked at it, it might be useful.
    Yuchen_Chang likes this.
  3. Sangemdoko


    Dec 15, 2013
    Interesting I was not aware of this package. I wonder if it's a good fit for my project though considering the branching aspect of gameplay cinematics.
    I'll definelty look into in more detail