"Rect Transform" Component's values are set to 0 when disabling the "Canvas" Component on the same GameObject
Unity: uGUI
As Designed
2023.3.X
2023.2.X
2023.1.X
2022.3.X
2021.3.X
Positions are not guaranteed if the Canvas component is disabled. They may have been kept at some point but if there's no rendering there's no way to rely on layout.
How to reproduce:
1. Open the user-attached project “CanvasTest”
2. Open the “SampleScene” scene
3. Enter the Play Mode
4. Observe the Console logs without and with the Canvas Component
Expected result: Both logs return the “293”
Actual result: The Console output without Canvas is “0” and “293” with the Canvas Component