[ad_1]
I’ve set my animation to play by a script I made nevertheless it’s not enjoying. I’ve all of the references appropriate my spelling is appropriate as nicely.
My code:
utilizing System.Collections;
utilizing System.Collections.Generic;
utilizing UnityEngine;
public class AnimationTrigger : MonoBehaviour
{
[SerializeField] personal Animator myDoor;
[SerializeField] personal string DoorOpen = "DoorOpen";
personal void OnTriggerEnter(Collider different)
{
if(different.CompareTag("Participant"))
{
myDoor.Play(DoorOpen, 0, 0.0f);
Debug.Log("Animation Performed");
}
}
}
Image of my animator window:
[ad_2]