hadashiA / VContainer

The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.
https://vcontainer.hadashikick.jp
MIT License
1.88k stars 163 forks source link

Suppress warning by using SetParent() #593

Closed VeyronSakai closed 8 months ago

VeyronSakai commented 8 months ago

The following warning was issued, so I used SetParent() to avoid this warning.

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 (UnityEngine.Transform)
VContainer.Unity.ObjectResolverUnityExtensions:ResetParent<UnityEngine.GameObject> (UnityEngine.GameObject) (at ./Library/PackageCache/jp.hadashikick.vcontainer@d85771d071/Runtime/Unity/ObjectResolverUnityExtensions.cs:143)
VContainer.Unity.ObjectResolverUnityExtensions:Instantiate<UnityEngine.GameObject> (VContainer.IObjectResolver,UnityEngine.GameObject) (at ./Library/PackageCache/jp.hadashikick.vcontainer@d85771d071/Runtime/Unity/ObjectResolverUnityExtensions.cs:51)
Survivor.Infrastructures.MobileUserInterfaceFactory/<CreateAsync>d__3:MoveNext () (at Assets/Scripts/Survivor/Infrastructures/MobileUserInterfaceFactory.cs:27)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1<Survivor.Infrastructures.MobileUserInterfaceFactory/<CreateAsync>d__3>:Run () (at ./Library/PackageCache/com.cysharp.unitask@cfe509a556/Runtime/CompilerServices/StateMachineRunner.cs:189)
UnityEngine.UnitySynchronizationContext:ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
warning
vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vcontainer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2023 11:44am