Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Hiding and showing group tracks via script? (Timeline workflow improvements)

Discussion in 'Timeline' started by artemio_morales, Jul 26, 2019.

  1. artemio_morales

    artemio_morales

    Joined:
    Nov 29, 2015
    Posts:
    19
    Hi there, I'm wondering if it's possible to hide and show group tracks via script. I've searched the Timeline documentation and can't find any exposed attributes or methods to handle this.

    I'm dealing with a large number of tracks and would like to show and hide all group tracks at once, as well as toggle tracks individually, so as to make the workflow within Timeline smoother and faster, without needing to manually close groups you're not working with.

    Ideally, I'd love to set the scroll position of the Timeline Editor window as well. For example, when I'm working with a large hierarchy, and a large number of tracks, I want to be able to select a game object, then quickly add any associated tracks to the selection, as well as automatically scroll the user to those tracks in the Timeline window.

    Any guidance appreciated! Or would love to see this functionality implemented.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    No, unfortunately there are no APIs exposed to do that. The collapsed value of a group track isn't stored on the track itself, but it's in the view data. We definitely should expose that functionality as well as scrolling and other editor related APIs.
     
    artemio_morales likes this.
  3. bpj_mdt

    bpj_mdt

    Joined:
    May 17, 2021
    Posts:
    8
    Hi there, I was curious if this has been changed in any newer versions?

    I made a button that lets me select a track associated with my current selected gameobject which works well, but if it is in a Track Group, the group doesn't unfold when the track is selected.