Skip to content

Commit

Permalink
fix(NetworkAnimator): Default animatorSpeed to 1 (#3801)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGadget1024 committed Apr 10, 2024
1 parent 278324c commit a96fe27
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/Mirror/Components/NetworkAnimator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a96fe27

Please sign in to comment.