com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

Animator Integer values continuously change when host is running, but bool/floats work fine

Open jhirst1 opened this issue 3 years ago • 3 comments

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:

  1. Add Network Object
  2. Add Network Animator
  3. Create Integer animation variable
  4. Start In-Game Mode
  5. Assign value to integer, e.g. animator.SetInteger("Variable1", 3);
  6. 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

jhirst1 avatar Dec 28 '21 18:12 jhirst1

Also experiencing this bug. Two things I've observed:

  1. It seems the integer only jumps when an animation using the value of the integer is active
  2. The numbers seem to be power of 2

nealohb avatar Jan 13 '22 21:01 nealohb

Tracked in our backlog MTT-3047

ashwinimurt avatar Mar 29 '22 22:03 ashwinimurt

This is probably fixed. Assigning my @ashwinimurt to verify and close. Tests must be added.

ashwinimurt avatar Aug 22 '22 18:08 ashwinimurt

This was verified fix using v1.0.2 but I believe it has been fixed since v1.0.0.

NoelStephensUnity avatar Oct 03 '22 18:10 NoelStephensUnity