Using sprite sheets to animate particles
We can add sprite sheetanimation to Unity's particles to make them more interesting. This concept is especially useful for various explosions and magical effects.
Getting ready
To follow this recipe, we need an animation exported as a sprite sheet. If you want to know how to create a sprite sheet animation, you can read the Exporting a 2D sprite animation from a 3D package recipe in Chapter 3, 2D and User Interface Animation, where you can find an example sprite animation.
Example sprite sheet animation
You can also open the provided example project and go to the Chapter 07 Special effects\Recipe 07 Using sprite sheets to animate particles
directory. If you open the Example.unity
scene there and play the game, you will see a particle system with explosions using sprite sheet animation. You can find the necessary sprite sheet in the Rigs
directory.
How to do it...
To use sprite sheets for particles animation, follow these steps:
- Import the sprite sheet texture...