2D Layer Sorting Tool Manual
The 2D Layer Sorting Tool is a utility designed primarily for bulk editing of sorting layers in prefabs within your Unity projects. It allows you to quickly and efficiently adjust sorting layers and orders for various components such as canvases, sprite renderers, sprite shape renderers, tilemap renderers, sorting groups, and particle system renderers.
1. Accessing the Tool:
- Navigate to Tools > 2D Layer Sorting Tool from the Unity menu bar to open the tool.
2. Selecting a Prefab:
- Use the Select Hierarchy Prefab field to select the prefab you wish to edit sorting layers for. (While it is recommended to work with prefabs directly from the hierarchy for better feedback, the tool is also compatible with prefabs from the project window.)
- Enable or disable the Include Nested Prefabs toggle based on whether you want to include nested prefabs in the editing process.
3. Reviewing Components:
- The tool will automatically populate lists of different components found within the selected prefab, such as canvases, sprite renderers, etc.
- Each component list displays the number of components found and allows you to enable or disable sorting layer changes and set adjustment values.
4. Adjusting Sorting:
- New Sorting Layer: Choose the desired sorting layer from the dropdown menu.
- Change Sorting Layer: Toggle this option to enable or disable changing the sorting layer for the selected component type.
- Order in Layer Change: Specify the adjustment value for changing the sorting order of the selected component type.
- S Button: Clicking this button selects the associated GameObject in the Unity editor, providing easy access for reviewing and editing.
5. Applying Changes:
- Once you're satisfied with the adjustments, click the Adjust Sorting button to apply the changes.
- It's recommended to review the changes before proceeding.
6. Finalizing Overrides:
- After applying the desired adjustments, click the Apply Overrides button to finalize the changes.
- This action applies the changes to the prefab instance.
Note:
Remember to review the changes thoroughly before applying overrides.
For best results and feedback, work with prefabs directly from the Unity hierarchy.
Always ensure to save your project before making significant changes.