KybernetikGames / animancer

Documentation for the Animancer Unity Plugin.
63 stars 8 forks source link

ClipTransitionSequence and ClipTransitionAsset.Unshared #312

Closed tylorr closed 9 months ago

tylorr commented 10 months ago

Is it safe to use these two together or does ClipTransitionSequence bypass the protections of Unshared by directly modifying the event sequence of the wrapped transition?

If so, would it be safer for me to, at runtime, unpack the ClipTransitionSequence and recreate it using several ClipTransitionAsset.Unshared that I construct from the defined ClipTransitionSequence?

KybernetikGames commented 10 months ago

Unfortunately, the UnShared would only apply to the first transition's state and events.

Unpacking like you suggested is probably the way to go. I'd probably start by making a class that inherits from ClipTransitionAsset.UnShared and has an array of them which you link together for the others in the transition (i.e. have each end event play the next UnShared transition like how the sequence does).