How it works...

Unity's particle system can play sprite sheet animation for each of its particles. To do so, the Texture Sheet Animation option has to be checked. This option has several important settings:

  • Tiles: The X and Y fields specify how many tiles in X and Y the texture sheet has. Animation is played from left to right and from top to bottom.
  • Animation: We can use the whole sheet or a single row. If the Single Row option is selected, we can use a random row of the Sprite Sheet or specify a single row for our animation. This way we can have multiple animations in one sprite sheet. It also gives us the possibility to have multiple animations per particle system, instead of playing the same one for every particle (Random Row has to ...

Get Unity 5.x Animation Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.