From 015c4d3f3575a6e35cbf716f0a939b4b1e609b8b Mon Sep 17 00:00:00 2001 From: MrGadget1024 Date: Thu, 29 Jul 2021 08:49:59 -0400 Subject: [PATCH] fix: Added missing [Command] attribute to NetworkAnimator.CmdSetAnimatorSpeed --- Assets/Mirror/Components/NetworkAnimator.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Assets/Mirror/Components/NetworkAnimator.cs b/Assets/Mirror/Components/NetworkAnimator.cs index a1d3be5a5..13d9c31f0 100644 --- a/Assets/Mirror/Components/NetworkAnimator.cs +++ b/Assets/Mirror/Components/NetworkAnimator.cs @@ -134,13 +134,6 @@ void CheckSpeed() } } - void CmdSetAnimatorSpeed(float newSpeed) - { - // set animator - animator.speed = newSpeed; - animatorSpeed = newSpeed; - } - void OnAnimatorSpeedChanged(float _, float value) { // skip if host or client with authority @@ -593,6 +586,14 @@ void CmdOnAnimationResetTriggerServerMessage(int hash) RpcOnAnimationResetTriggerClientMessage(hash); } + [Command] + void CmdSetAnimatorSpeed(float newSpeed) + { + // set animator + animator.speed = newSpeed; + animatorSpeed = newSpeed; + } + #endregion #region client message handlers