diff --git a/Mirror/Components/NetworkAnimator.cs b/Mirror/Components/NetworkAnimator.cs index f067d276..cc925a92 100644 --- a/Mirror/Components/NetworkAnimator.cs +++ b/Mirror/Components/NetworkAnimator.cs @@ -81,18 +81,14 @@ namespace Mirror lastIntParameters = new int[parameters.Length]; lastFloatParameters = new float[parameters.Length]; lastBoolParameters = new bool[parameters.Length]; + + animationHash = new int[animator.layerCount]; + transitionHash = new int[animator.layerCount]; + layerWeight = new float[animator.layerCount]; } void FixedUpdate() { - // QSB: move array init here since layerCount will not be 0 - if (animationHash == null) - { - animationHash = new int[animator.layerCount]; - transitionHash = new int[animator.layerCount]; - layerWeight = new float[animator.layerCount]; - } - if (!SendMessagesAllowed) return;