Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Creating groups and set parent from script

Discussion in 'Timeline' started by miniduck, Apr 28, 2018.

  1. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    Hello,

    Been trying to figure out how to create a group and parent items all from the API.
    Anyone has any ideas how to do this?

    Many thanks
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,403
    You can use Timeline.CreateTrack<GroupTrack>(null, "GroupName"), to create the group and call track.SetGroup(groupTrack) on other tracks to reparent them.
     
    miniduck likes this.
  3. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    Many thanks that works!
     
unityunity