UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"On trigger touch, start animation"
using UnityEngine; public class TriggerAnimation : MonoBehaviour { public Animator animator; public string animationName; private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { animator.Play(animationName); } } }