Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Sorting sprites

Control the order of sprites with sorting layers, sorting groups, and distance calculations.
Read time 1 minuteLast updated 10 days ago

Resources for understanding how Unity orders 2D GameObjects in a scene, and how to control the order with sorting layers, sorting groups, and distance calculations.

Topic

Description

2D rendering orderLearn about the criteria Unity uses to decide whether one 2D GameObject renders in front of another.
Change the sorting order of 2D GameObjectsArrange 2D GameObjects in layers, set the order within a layer, and change how Unity calculates distance.
Prevent 2D GameObjects mixing in sorting layersKeep groups of 2D GameObjects from mixing together on the same sorting layers and sublayers.
Sorting Group component referenceExplore the properties you can use to determine the rendering order of a group of 2D GameObjects.

Additional resources