animancer
animancer copied to clipboard
HybridAnimancerComponent SetFloat(int id, float value, float dampTime, float deltaTime, float maxSpeed = float.PositiveInfinity) bug and solution
Environment
- Animancer Version Number: 7.4.2
- Animancer Pro or Lite: Pro
- Unity Version: 2022.3.4f1
- Platform: Windows 11
Description
The HybridAnimancerComponent SetFloat() method always passes a name even when called with an int ID.
which results in a "Parameter 'Hash #######' does not exist." warning.
A simple fix is to replace 'name' with 'id':
Thanks for letting me know, that fix will be in the next version of Animancer.
I just found another few more similar mistakes in that script. There's 4 places with States.TryGet(name
which should be States.TryGet(stateName
instead.