Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Is allowAutoCreate=false of TrackClipType bugged or what is it supposed to do?

Discussion in 'Timeline' started by fxlange, Oct 16, 2023.

  1. fxlange

    fxlange

    Joined:
    Dec 20, 2016
    Posts:
    45
    What is the purpose of
    TrackClipType
    allowAutoCreate = false
    and is it still working (Unity 2022.3.10)?

    While working on my own custom timelines I noticed that allowAutoCreate had no effect. But now I'm also not sure anymore what it is supposed to achieve.

    The only timelinetrack provided by Unity which actually uses allowAutoCreate=false is
    AnimationTrack

    [TrackClipType(typeof(AnimationPlayableAsset), false)]`. But here I can't find any difference to other timlinetracks in terms of autocreation. When dragging an animation clip asset on an animation track it creates a clip and the menu offers "Add from Animation Clip". Even when dropping on empty space inside an timline (over trackbinding or tracks) I'll get an animation track with an animation clip. For me it looks like all types of auto creation are working.

    Follow up question for extra points ;)

    When dropping gameobjects onto trackbindings I'm offered to add the missing component to the gameobject. Does this exist for trackclip types as well? This is what I was actually looking for when stumblin upon allowAutoCreate.

    Thanks,
    Felix