Further Optimization Options for Meshes

The included projectiles use individual Order In Layer values in the Particle System Renderer for each material.

If your purchased projectile VFX asset includes meshes, the Particle System module provides additional options to further optimize batch calls (Sorting Layer Editor)

All meshes already use dedicated Order In Layer values, for example one value for additive unlit materials and another for alpha blended unlit materials. However, Unity cannot efficiently batch different meshes when they share the same sorting layer, even if they use identical materials.

To further reduce batch calls, you can ensure that identical meshes using the same materials are rendered in a single batch across multiple projectiles. Simply open the particle system that renders a mesh and assign a dedicated Sorting Layer ID in the Renderer settings of that particle system. This allows Unity to group matching meshes more efficiently and improves overall render performance.

You can repeat this setup for each mesh type and set a dedicated layer for different meshes. E.g. bullet mesh to Bullet sorting layer, circle mesh to Circle sorting layer, etc.

This approach allows Unity to batch draw calls more efficiently and can noticeably improve performance when many projectiles are active at the same time.

For your convenience, there are some helper scripts in the included Particle System Utils module, which you can find under SF Studio → Shared → Modules → Particle System Utils

For a detailed overview of helper scripts and usages, please refer to the dedicated module documentation.

Alternative Option

An alternative option is to manually adjust the Order in Layer value for each mesh. For example, you could use values like -4 and -5 for one projectile mesh, -6 and -7 for another, and so on. However, this method quickly becomes hard to manage, as you need to remember the order values for every individual mesh. Using dedicated sorting layer IDs is generally the cleaner and more maintainable solution.

Last updated