Particle FX rendering

Particles are rendered on a different thread to game objects. This will cause them to render in front of other game objects. For most purposes this is what you would want, but if you are using Particle FX to create a star field for example, you will want the stars rendering behind the space ships.

To achieve this you need to change the material tag from 'particle' to 'tile' so that it is rendered with the other sprites instead.

  1. In the assets panel, find the 'builtins\materials' folder.
  2. Right click, 'particlefx.material' and select, 'copy'. [CTRL-C]
  3. In the assets panel, navigate to your 'main' folder or another folder you have created.
  4. Right click and select, 'Paste'. [CTRL-V]

Note, you will not be able to save changes to the 'builtins' file which is why you need to take a copy of the material.

  1. Double click, 'particlefx.material' (you can rename this file to match the name of your game object, e.g. 'stars.material').
  2. In the editor panel, change the, 'Tags' property from 'particle' to 'tile'.
  3. In the assets panel find your .particlefx file that you want to apply this material to and double click it.
  4. In the properties panel, change the 'Material' property to the new .material file you have just created.

The Particle FX object will now render in front of the game objects and you can use the Z property to change the layer.