Animator Integer values continuously change when host is running, but bool/floats work fine
Describe the bug If a network object has a Network Animator component and Animator.SetInteger is assigned by the Owner at runtime when host is running, the value loops around from a very large negative number to a very large positive number, e.g.
animator.SetInteger("Variable1", 3);
To Reproduce Steps to reproduce the behavior:
- Add Network Object
- Add Network Animator
- Create Integer animation variable
- Start In-Game Mode
- Assign value to integer, e.g. animator.SetInteger("Variable1", 3);
- Start Host
Actual outcome Integers cannot be used by the NetworkAnimator for state machine decisions because the value keeps looping through different values, from a very high value to a very large negative value.
Expected outcome Integers should be supported by the NetworkAnimator
Screenshots
Environment (please complete the following information):
- OS: Win10
- Unity Version: 2020.3.25f1
- Netcode Version: Version 1.0.0-pre.3
- Netcode Commit: com.unity.netcode.gameobjects << whatever is pulled in automatically by the package manager using Add Package From GitURL
Also experiencing this bug. Two things I've observed:
- It seems the integer only jumps when an animation using the value of the integer is active
- The numbers seem to be power of 2
Tracked in our backlog MTT-3047
This is probably fixed. Assigning my @ashwinimurt to verify and close. Tests must be added.
This was verified fix using v1.0.2 but I believe it has been fixed since v1.0.0.