animancer icon indicating copy to clipboard operation
animancer copied to clipboard

Mixer Transitions show a toggle on their child speeds when they shouldn't

Open KybernetikGames opened this issue 2 years ago • 3 comments

Environment

  • Animancer Version Number: v7.4.2
  • Animancer Pro or Lite: Both
  • Unity Version: Any
  • Platform: Any

Description

These toggles below the Speed header shouldn't be there.

upload_2023-2-10_18-21-25

Reproduction

  1. Make a mixer transition field.
  2. Add some animations to it.
  3. Change one of their speeds.
  4. Make sure your Inspector is wide enough to not have the toggles off the side of the screen.

Fix

  1. Open ManualMixerTransitionAsset.cs.
  2. Go to the _Speeds field (not _Speed).
  3. Mark the [AnimationSpeed] attribute just above it as optional:
#if UNITY_EDITOR
[AnimationSpeed(IsOptional = false)]
#endif

KybernetikGames avatar Feb 11 '23 01:02 KybernetikGames

A little gotcha -- IsOptional doesn't exist at build-time, so I had to wrap the attribute in an #if UNITY_EDITOR to make my builds work!

chemicalcrux avatar Feb 11 '23 19:02 chemicalcrux

Thanks for letting me know, I've edited the OP.

KybernetikGames avatar Feb 11 '23 23:02 KybernetikGames