Get all GroupTrack In Timeline

Hi Guys

Is there a way to Get all GroupTrack in Timeline ?

The GetOutputTrack won’t get GroupTrack.

I really don’t want to scan all OutputTrack and get their parent…

Thx.

3349859--261986--圖片 41.png

GetOutputTracks() is exactly the opposite of what you want. It only gets tracks that generate an actual ‘output’. Output here references to a PlayableOutput in the playable system.

Instead use GetRootTracks(). It gets the nested hierarchy, group tracks included.

1 Like

I already get OutputTracks , but I need GroupTrack TOO

Because Timeline have lot of problem in copy track and paste to another timeline. (see issue 979587, 959839, 974394 etc)

And our project can’t wait until the “future release” come out. So we make an timeline copy tool too avoid those issue.
Without getting group track, the new timeline won’t see like origin one.

Using the API call TimelineAsset.GetRootTracks() on the timeline will get all tracks, the group tracks included.

Thanks.
I’ll try that.

How to get sub-Group Track?? I I cant get it from outputs rootoutputs

GetRootTracks() gives you the top most hierarchy. On a track, you can call GetChildTracks() to get the nested tracks. On a groupTrack, this will give you the list of tracks in a group. On an animation track, that will give you any additional layers (i.e. override tracks).

GetOutputTracks() is a shorthand to get all the tracks that produce a playable output, i.e. basically everything except group and override tracks.

GetRootTracks() / GetChildTracks() lets you walk the hierarchy of tracks as seen in the editor.