To simulate fire using Texture Sheets, follow these steps:
- Create a new Unity 3D project and import the blue2_64.png flame sprite sheet texture image asset file. Ensure this image asset has its Texture Type set to Sprite 2D and UI in the Inspector window.
- Examine the sprite sheet, making a note of the number of columns (X-tiles) and rows (Y-tiles). We need these numbers to customize our particle system later in this recipe:
Figure 14.20 – The blue flames sprite sheet (X = 10-columns, Y = 6-rows)
- To use sprite sheet texture images, we must create a Material to assign to the particle system's Renderer module. In the Project window, create a new Material named m_blueFire (menu: Create | Material).
- With m_blueFire selected in the Project window, in the Inspector window, select the Particles/Standard Unlit shader, set Rendering Mode to Additive, and check the Soft Particles option:
Figure 14.21 – Customizing...