0
votes

I'm trying to script an sprite animation event for my player's character shooting animation, where the first frame of the sequence is the only one shown when no bullet is shot, and when you shoot it plays the rest of the frames.

I can see the animator window for the controller has an option to create new states and connect between them. The "Motion" row of the states accepts animation files (clips?), so I tried creating new Animation to put the shooting frames in, but it has no sprite properties in it as the automatically created Animation file (when importing the PNG sequence) has, I can't add anything and it doesn't allow for new keyframes to be created. So how do I actually use that to create an animation sequence for the animation state?

Thanks in advance.

1

1 Answers

0
votes

I feel like it would be best if you rephrased / elaborated a bit more in your question. So i'm going to answer it the best I can. If you want to do it by script, you can try this answer:

https://answers.unity.com/questions/1031965/how-to-create-animation-event-at-specific-keyframe.html

If you want to add an event clip in the animation itself, try this:

https://www.youtube.com/watch?v=3_ZFSZr-sJI