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