Search Issue Tracker
Won't Fix
Won't Fix in 1.0.X
Votes
1
Found in [Package]
1.0.0-pre.6
Issue ID
NCCBUG-152
Regression
No
Reparenting RectTransform with SetParent method throws warning about using the same method
How to reproduce:
1. Open attached project
2. Load SetParent Scene
3. Enter Play Mode
4. Select NetworkManager in Hierarchy and in Inspector click Start Host
5. In Game view click Button
6. Observe Console
Code:
UI.GetComponent<RectTransform>().SetParent(canvas.transform, false);
Error:
Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.
Reproduced with: 2022.1.0b12
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
- EditorGUILayout.PropertyField foldout icon inside Vertical Layout Group has an incorrect indent when used with OnInspectorGUI()
- [Android] [iOS] "NullReferenceException: Object reference not set to an instance of an object" throws when entering the Play Mode/opening the application
- The Player freezes on load when building Web platform
- Animator "Conditions" tab breaks when the only Parameter is deleted and another one is created
- "Shader error in 'Universal Render Pipeline/Lit': maximum ps_5_0 sampler register index (16) exceeded" error thrown after a build is completed when the "LOD Cross Fade" parameter is enabled
Resolution Note:
There are no fixes planned for this Bug
Resolution Note (1.0.X):
The attached project was still using:
"com.unity.netcode.adapter.utp": "1.0.0-pre.6",
"com.unity.netcode.gameobjects": "1.0.0-pre.6",
Responded to the customer to update their project to the most current version. The issue with the WorldPositionStays not synchronizing properly is resolved in PR-2146, but Netcode for GameObjects does not support synchronizing RecTransform.