Version: Unity 6 (6000.0)
Language : English
Scriptable Render Pipeline Batcher in URP
Enable the SRP Batcher in URP

Check whether a GameObject is compatible with the SRP Batcher in URP

GameObject compatibility

In any given sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
, some 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
are compatible with the SRP Batcher, and some aren’t. Compatible GameObjects use the SRP Batcher code path, and non-compatible GameObjects use the standard SRP code path. For more information, see How the SRP Batcher works.

A GameObject must meet the following requirements to be compatible with the SRP Batcher code path:

  • The GameObject must contain either a 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
    or a skinned mesh. It can’t be a particle.
  • The GameObject mustn’t use MaterialPropertyBlocks.
  • The shaderA program that runs on the GPU. More info
    See in Glossary
    that the GameObject uses must be compatible with the SRP Batcher. For more information, see Shader compatibility.

Shader compatibility

All lit and unlit shaders in the 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) and the High Definition Render Pipeline (HDRP) fit this requirement (except for the particle versions of these shaders).

For a custom shader to be compatible with the SRP Batcher it must meet the following requirements:

  • The shader must declare all built-in engine properties in a single constant buffer named UnityPerDraw. For example, unity_ObjectToWorld, or unity_SHAr.
  • The shader must declare all material properties in a single constant buffer named UnityPerMaterial.

You can check the compatibility status of a shader in 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
panel.

You can check the compatibility of your shaders in the Inspector panel for the specific shader.
You can check the compatibility of your shaders in the Inspector panel for the specific shader.
Scriptable Render Pipeline Batcher in URP
Enable the SRP Batcher in URP