Using DrawMeshInstancedIndirect Draw 100000+ Grass
https://remoooo.com/en/unity-instanted-grass
https://remoooo.com/unity-instanted-grass
URP-With-New-Tool-v1.0 Branch.
- Draw Grass Tool
- URP project
- Create an empty object in your Unity scene. Name it
Grass Generator - Holder
. - Place the
GrassPainter.cs
script into the Editor folder of your project. This is necessary for the script to function properly in the Unity Editor. - Attach the
GrassControl.cs
script to theGrass Generator - Holder
object you created in Step 1. - Select the object(s) where you want to generate grass.
With the object(s) selected, go to the GrassControl component on your
Grass Generator - Holder
object and click the Generate Grass to Selected Objects button.




Key code:
Graphics.DrawMeshInstancedIndirect(blade, 0, m_Material, m_LocalBounds, m_argsBuffer);
Reference: