neon-age / Smart-Hierarchy

Human-friendly hierarchy for Unity.
MIT License
599 stars 43 forks source link

Multiple Warnings during Play #2

Closed Thane5 closed 3 years ago

Thane5 commented 3 years ago

I'm working with Bolt on UI elements for my game, and some of the canvas elements seem to cause warning messages like this:

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. UnityEngine.Transform:set_parent(Transform) AV.Hierarchy.DetachOnBuildProcess:OnProcessScene(Scene, BuildReport) (at Library/PackageCache/com.av.smart-hierarchy@5a8cc0892c/Base/DetachOnBuildProcess.cs:45) UnityEditor.Build.BuildPipelineInterfaces:OnSceneProcess(Scene, BuildReport)

neon-age commented 3 years ago

Changed to SetParent method and also reparenting to folder's parent instead of scene root.

Thane5 commented 3 years ago

Tested in my scene, seems to work now.