Version: Unity 6.7 Alpha (6000.7)
Language : English
Set 3D GameObjects to interact with Sprite masks
Custom rendering and post-processing for 2D in URP

Sort 3D GameObjects with 2D sprites

Sort 3D GameObjects with 2D sprites in the same scene.

When you enable the Sort as 2D property, if 3D meshes have the same depth, Unity renders them like overlapping 2D sprites instead of intersecting meshes.

Follow these steps:

  1. Add a Sorting Group component to the 3D GameObject.
  2. Enable Sort as 2D in the Sorting Group property settings.
  3. Assign Sorting Layers and Order in Layer values to determine the 3D renderer’s position in the render queue.

Important: Enabling the Sort as 2D setting clears the object’s depth information which means you cannot use it with depth-based post-processing effects. If you want to use these kind of effects, use Unity’s default behavior that renders sprites and meshes based on their world-space depth.

Additional resources

Set 3D GameObjects to interact with Sprite masks
Custom rendering and post-processing for 2D in URP