KybernetikGames / animancer

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

How to get frame rate of `LinearMixerState`? #301

Closed slowhei closed 1 year ago

slowhei commented 1 year ago

I have tried checking LinearMixerState.Clip.frameRate, but Clip is null for LinearMixerState.

Thanks.

KybernetikGames commented 1 year ago

AnimancerUtilities.TryGetFrameRate will get it from the mixer's children, but only if they all have exactly the same frame rate. Otherwise you would need to iterate through the children yourself using mixer.GetChild(x) and decide how you want to handle varying rates.

slowhei commented 1 year ago

Thank you!