To place a GameObjectThe 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 into a Sorting Group, add the Sorting Group component to it:
When you add a Sorting Group component to a GameObject, Unity applies the same Sorting Group to all child GameObjects of the GameObject the component is attached to.
Unity uses the Sorting Group’s settings to determine how to sort its Renderers among other Renderers and Sorting Groups in the 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. See 2D sorting for more information.
To sort Renderers within a Sorting Group, Unity uses the individual sort settings of the Renderers in the Sorting Group. See Sorting Renderers within a Sorting Group for more information.
SortingGroup