Version: Unity 6.4 (6000.4)
Language : English
Prevent 2D GameObjects mixing in sorting layers
Various image sizes without multiple assets

Sorting Group component reference

Explore the properties you can use to determine the rendering order of a group of 2D 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
. For more information, refer to Prevent 2D GameObjects mixing in sorting layers.

Property Description
Sorting Layer Sets the sorting layer of the sorting group. All the child GameObjects render on this sorting layer, but keep their order. Unity renders sorting layers in the order of the list in the Tags and layers window.

Select Add Sorting Layer to create a new sorting layer.
Order in Layer Sets the sublayer of the sorting group within the Sorting Layer. All the child GameObjects render on this sublayer, but keep their order. Unity renders lower values before higher values.
Sorting Type Sets where Unity places the group while sorting. The options are:
  • Default: Unity sorts this group with other groups at the same level in the hierarchy.
  • Sort at Root: Unity sorts this group at the top level of the hierarchy, and ignores the parent sorting group.
  • Sort 3D as 2D: Unity sorts this group at the top level of the hierarchy, and ignores the z value of 3D GameObjects in the group so they’re sorted as 2D.

Additional resources

Prevent 2D GameObjects mixing in sorting layers
Various image sizes without multiple assets