Special effects in Unity? No problem. See how easy it is to implement enemy explosions.
- Create an animation for the Enemy object.
- Open the animator window and add new empty state, set it as the default.
- Add a transition from the empty state to the animation and add animator trigger parameter.
4. Finally, write code to activate the trigger when the enemy is destroyed.
Look at the purple parts of the code, they are responsible for setting the trigger when the laser hits the enemy. You just need the animation, the animator trigger and a few lines of code to make the explosions work.