unet5.1 anim Trigger parameter/ how do I use NetworkAnimator.SetTrigger() ??

okay, so all my animations work over the network, Except my jump animation, it uses a trigger param.

  • a NetworkAnimator component on the character
  • a script with NetworkAnimator.SetParameterAutoSend(0, true) // for each param, has it.
  • player input script calls animations Animator.SetFloat() , Animator.SetInt(), Animator.SetTrigger

…all works except jump… (character moves, anim doesnt play)
so i look in the docs and i find NetworkAnimator.SetTrigger() … and i try to use it. and it doesnt work… :frowning:

from the player Input Controller script : (relevant parts)

// == animation vars ==
    private Animator anim;
    [HideInInspector] public int jumpHash;
    private Player_NetworkAnimation netAnimScript;

void Awake ()
    {
        jumpHash = Animator.StringToHash ("jumpTrigger");
    }
void Start ()
    {
        anim = GetComponent<Animator>()
    }

Update()
{
... ... ...
//=== ----- Jump ----- ===           
                if (InputManager.GetButtonDown("Jump") && sprintFuel >= sprintFuelMin && stanceFlag == 0)
                {
                    sprintFuel -= jumpSFuelDepletion;
                    moveDirection.y = jumpHeight;
             
                    anim.SetTrigger (jumpHash);
                    netAnimScript.NetCharacterJump();
                }
            }
}

from another script attached to the player character GO that handles Player_NetworkAnimation.cs:

NetworkAnimator netAnimator;

public void NetCharacterJump()
    {
        if(isLocalPlayer)
        {
            netAnimator.SetTrigger("jumpTrigger");
        }
    }

… ive tried it with and without the if(isLocalPlayer)

NetworkAnimator.SetTrigger()
asks for either the name of the anim param. OR the anim param.s hash ID
… i gave it the name that i have set up in the Animator window… is that right?
and… the hashID how do i find that out? … uh, in my PlayerInputController.cs i have
the hashes made with Animator.StringToHash and i can see it in the inspector… is that the right hash ? i dont think so, the docs say “from the animator” … idk how to get that.

derp

i had to add netAnimScript = GetComponent<Player_NetworkAnimation>();
in Start()

dunno how i missed that lol …