Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress warning by using SetParent() #593

Merged
merged 1 commit into from Dec 18, 2023

Conversation

VeyronSakai
Copy link
Contributor

@VeyronSakai VeyronSakai commented Dec 15, 2023

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

Copy link

vercel bot commented Dec 15, 2023

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

@VeyronSakai VeyronSakai marked this pull request as ready for review December 15, 2023 11:49
@VeyronSakai VeyronSakai changed the title Surppress warning by setting null by using SetParent() Suppress warning by using SetParent() Dec 15, 2023
Copy link
Owner

@hadashiA hadashiA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. 👍

@hadashiA hadashiA merged commit bdf4585 into hadashiA:master Dec 18, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants