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

This commit is contained in:
MrGadget 2024-04-10 12:19:12 -04:00 committed by GitHub
parent 278324c1f1
commit a96fe27037
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;