ECS and SRP Batcher

DOTS Instancing Support (Entities Graphics)

The asset includes full support for Unity's Entity Component System (ECS) through DOTS Instancing, allowing you to use All In 1 VFX Toolkit materials with Entities Graphics.

circle-info

This is an advanced feature for users already working with Unity's ECS architecture. The asset does not include automatic tools for ECS setup — materials are assigned manually through the material inspector as you would with any other ECS-compatible shader.

How to Use

  1. Make sure the Entities Graphics package is installed in your project and that you are using URP.

  2. Create and configure your VFX Toolkit material as you normally would through the material inspector, enabling the effects and properties you need.

  3. Assign the material to your entity's rendering component. VFX Toolkit materials are fully compatible with Entities Graphics and can be assigned directly without any additional conversion or special setup.

Shader Files

The DOTS instancing support is implemented through a dedicated shader and an accompanying shader library. These files are located at:

  • Assets/Plugins/AllIn1VfxToolkit/Shaders/AllIn1VfxDOTS.shader

  • Assets/Plugins/AllIn1VfxToolkit/Shaders/ShaderLibrary/AllIn1VfxSRPBatch_*.hlsl

These files are included with the asset and require no manual modification.


SRP Batcher Compatibility

The asset is fully compatible with Unity's SRP Batcher. When using URP, the SRP Batcher automatically groups All In 1 VFX Toolkit materials that share the same shader variant into efficient batches. This means you can have many different materials with different property values and still benefit from reduced draw calls, as long as they use the same combination of enabled effects.

To verify that SRP Batching is active on your materials, open the Frame Debugger (Window → Analysis → Frame Debugger) and look for draw calls marked as "SRP Batch" in the draw call list.

Last updated