Search Issue Tracker
By Design
Votes
3
Found in
2021.3.46f1
2022.3.52f1
6000.0.29f1
6000.1.0a4
Issue ID
UUM-89064
Regression
No
canvas.rootCanvas returns self instead of true rootCanvas when the child canvas's GameObject is disabled
Reproduction steps:
1. Open the attached “TestCanvasIssue.zip” project
2. Open the “Assets/SampleScene.unity” Scene
3. Enter the Play Mode
4. Observe the Console window
Expected result: “childCanvas.rootCanvas == rootCanvas: True” is printed
Actual result: “childCanvas.rootCanvas == rootCanvas: False” is printed
Reproducible with: 2021.3.46f1, 2022.3.52f1, 6000.0.29f1, 6000.1.0a4
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Note: Only reproducible if the child canvas is disabled.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Error “Shader error in 'YSCloudCover': call to 'tex3D' is ambiguous at Assets/YSCloudCoverText.shader(606) (on d3d11)“ is present when compiling tex3D shader with DXC
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
Resolution Note:
The system has been created not to keep the reference of the canvas when it’s disabled, even when the transform hierarchy is working.
In this case, it is best to check if a canvas is a root canvas manually by traversing the parents in the hierarchy. We agree that the documentation could be improved in that area and we will provide an example there in a near future.