xxxxxxxxxx
using UnityEngine;
public class ObjectAnimator : MonoBehaviour
{
private Animator animator;
private void Start()
{
animator = GetComponent<Animator>();
}
private void Update()
{
// You can trigger animations based on certain conditions or events
if (Input.GetKeyDown(KeyCode.Space))
{
animator.SetTrigger("Jump");
}
}
}