How to reproduce:
- Create and open a new project
- Create a new Canvas → Image GameObject
- Set “UI Scale Mode“ to “Scale With Screen Size“ on the Canvas Scaler Component
- Make a Prefab of the Canvas GameObject
- Select the Prefab in the Project Tab
- Change the Scale on the X axis to any value
- Double-click the Prefab in the Project Tab to open it in Prefab Mode
- Make any change to the prefab (not on scale) to force a serialization
- Select the Canvas Prefab in the Project tab again
- Observe the Scale on the X axis in the Inspector
Actual result: 0 is displayed
Expected result: the old value is displayed
Reproducible in: 2023.1.0a1, 6000.0.68f1, 6000.3.10f1, 6000.4.0b10, 6000.5.0a7
Reproduced on: Windows 11 Pro (25H2)
Not reproduced on: No other environment tested
Notes:
- This is reproducible only if Canvas Scaler is editable in Prefab Mode (e.g., if the Width/Height, Anchor, and Pivot values are non-default, the Canvas Scaler Component will not be editable (because of non-root Canvas), and in turn the bug won’t occur)
- Reproducible with all Position, Rotation, and Scale transforms
- The reporter states that this correlates to the Game view being closed, however when testing locally, the issue was observed with the Game view open as well