Boa tarde pessoal eu estou com a seguinte duvida, eu criei umas animações no Animator da unity
a duvida é o seguinte como eu acesso os metodos crados no animator via script como o grounded ali e o id Animation, eu vi dessa forma na internet mas parece que n funciona
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class aulaScript : MonoBehaviour{
private Animator playerAnimator;
public bool Grounded;
public int idAnimation;
// Start is called before the first frame update
void Start(){
playerAnimator = GetComponent<Animator>();
}
// Update is called once per frame
void Update(){
playerAnimator.setBool("grounded", Grounded);
}
}