using System.Collections; using System.Collections.Generic; using UnityEngine; public class animationOnCollide : MonoBehaviour { private void OnTriggerEnter2D(Collider2D other) { GetComponent().SetTrigger("Hello"); } }