Version: Unity 6.0 (6000.0)
Language : English
Introduction to GPU instancing
Troubleshooting GPU instancing

Enable GPU instancing for a prebuilt material

To enable GPU instancing for a prebuilt materials, follow these steps:

  1. Select the material in the Project window.
  2. In the Advanced Options section of the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    window, enable Enable GPU Instancing.

Note: If you use the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
(URP) or High Definition Render Pipeline (HDRP), the recommended best practice is to use the SRP Batcher instead, which is enabled by default. GPU instancing works only if you disable the SRP Batcher.

If multiple GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
use the same meshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
and material, Unity now uses GPU instancing to render them in single draw calls. To check this, open the Frame Debugger and look for render passes called Draw Mesh (Instanced).

If there’s no Enable GPU Instancing property, the prebuilt shaderA program that runs on the GPU. More info
See in Glossary
doesn’t support GPU instancing.

Change the properties of instances

To change the properties of instances at runtime, for example to give each instance a different color or position, create a script to do the following:

  1. Create a MaterialPropertyBlock with the property value for the instance.
  2. Attach the script to the Mesh RendererA mesh component that takes the geometry from the Mesh Filter and renders it at the position defined by the object’s Transform component. More info
    See in Glossary
    component of the GameObject.

For more information, refer to MaterialPropertyBlock.

Create custom instances

To render multiple instances of a mesh in a script using GPU instancing, use one of the following APIs:

Additional resources

Introduction to GPU instancing
Troubleshooting GPU instancing