fix(NetworkAnimator): Default animatorSpeed to 1 (#3801)

This commit is contained in:
MrGadget 2024-04-10 12:19:12 -04:00
parent 6539bbc136
commit b5f5e25aab

View File

@ -31,11 +31,12 @@ public class NetworkAnimator : NetworkBehaviour
public Animator animator;
/// <summary>
/// Syncs animator.speed
/// Syncs animator.speed.
/// Default to 1 because Animator.speed defaults to 1.
/// </summary>
[SyncVar(hook = nameof(OnAnimatorSpeedChanged))]
float animatorSpeed;
float previousSpeed;
float animatorSpeed = 1f;
float previousSpeed = 1f;
// Note: not an object[] array because otherwise initialization is real annoying
int[] lastIntParameters;