Why is it that when I tick mark "create collider", the collider positions itself at "100000" in the Z axis and when I move it and hit the play button, the collider disappears. I also tried adding a box collider through component>physiscs but I am facing the same problem.
Update: I created a cube and parented it to the animated sprite. It triggers but gives me this error:
NullReferenceException: Object reference not set to an instance of an object
TriggerAnimation.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Scripts/TriggerAnimation.cs:17)
Update: I set the collider type to "unset", re-added the box collider and that fixed it but every time I pass the collider it plays the animation. It is set to "play automatically" and wrap mode "once". I want the animated sprite to play once and destroy/hide/deactivate itself. Could you please tell me how?