Course contentsShow
← Unity Game Development
Lesson 649 of 82810. VFX and Post-ProcessingFree lesson

Managing Texture Sheet Animation for Sprites

Students will animate complex sprite sequences within particle systems to create flipbook-style effects like fire or magical energy.

In this lesson, you will learn how to leverage the Texture Sheet Animation module within the Shuriken particle system to create dynamic, frame-based visual effects like flickering fire or crackling magical energy.

The Power of Flipbooks

When creating complex VFX, you often want a sprite to change its appearance over its lifespan. Instead of creating hundreds of individual objects, we use a Texture Sheet (or Sprite Sheet)—a single grid containing every frame of your animation. By enabling the Texture Sheet Animation module in your particle system, Unity automatically cycles through these frames based on the particle's normalized age.

Configuration Essentials

To set this up, select your Particle System and enable the Texture Sheet Animation module. You must define the Tiles (the grid layout, such as 4x4 or 8x8) based on your texture's dimensions.

The Animation setting is crucial:

  • Whole Sheet: The system plays every frame sequentially from top-left to bottom-right across the particle's entire Start Lifetime.
  • Single Row: Useful if you have multiple animations packed into one texture; you can specify which row to play, preventing the particle from "jumping" into the wrong animation sequence.

Controlling the Flow

You can control the speed of the animation using the Frame over Time curve. If you set this to a linear ramp, the animation plays at a constant speed. However, using a custom curve allows for sophisticated timing—for instance, making a magical explosion start slowly, speed up at the peak, and then slow down as the energy dissipates.

// Conceptually, the particle system handles this internally:
float frame = Mathf.Floor(normalizedAge * totalFrames);
// The shader then offsets the UVs to display only the requested tile:
// newUV = (originalUV / tilesX) + offsetBasedOnFrame;

By combining this with the Color over Lifetime module—fading the sprite out as the animation reaches its final frames—you can create fluid, professional-grade particle effects that feel hand-animated while remaining highly performant.

Key Takeaway: Texture Sheet Animation allows you to map a single grid-based asset across a particle's lifespan, enabling high-fidelity frame-by-frame animation controlled by simple curves.