Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2022.1.X



Found in


Issue ID




[2D] Sorting Layer Order in Layer key resets to 0 in Animation window and in Inspector.



There's a bug that is preventing users to key the Sorting Layer ordering properly.

Any values assigned to the Sprite Renderer.Sorting Layer in the Animation window and to the Order in Layer in the Sprite Renderer component in the Inspector gets reset to 0.

How to reproduce:
1. Drag in a single PNG file or a PSB file into the Scene (without Sprite Skin) in Editor version newer than 2020.3.24f1.
2. Open up the Animation window and create a new Animation clip.
3. Still in the Animation window, enable keyframe recording mode by hitting the red record button.
4. In the GameObject Inspector, under the Sprite Renderer component, right-click on the Order in Layer parameter to "Add Key".

Expected results: The Order in Layer gets keyed at its existing value e.g. 26.
Actual results: The Order in Layer resets to 0. This happens even when a new value is assigned.

5. In the Animation window, scrub the timeline to a new frame and type in a new value directly under Sprite-Renderer.Sorting Order.

Expected results: The Sorting Order updates to the new value e.g. 26.
Actual results: The Sorting Order resets back to 0 upon hitting enter.

Reproducible with 2022.a.0a13.1822, 2022.1.0a16.2319
Not reproducible with 2020.3.24f1, 2021.1.28f1, 2021.2.5f1

  1. Resolution Note (fix version 2022.2):

    Fix for this issue available on Unity 2022.2.0a3 and above

  2. Resolution Note (fix version 2022.1):

    Fix for this issue available on Unity 2022.1.0b7 and above

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.