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

AspectRatioPadding error #5

Open
rpil opened this issue Oct 20, 2022 · 0 comments
Open

AspectRatioPadding error #5

rpil opened this issue Oct 20, 2022 · 0 comments

Comments

@rpil
Copy link

rpil commented Oct 20, 2022

For clarity we can say there is 2 versions of this script

  1. the "margin" version, which is the one in the code
  2. the "additional element" padding version, which is commented out

This might be a Unity 2022.2 beta issue, but when setting width & height to 100%, and flex shrink to 0, right margin no longer registers correctly. However, commenting those 3 lines out and adding style.flexGrow = 1 will get right margin working, HOWEVER Unity starts throwing errors:

"Layout update is struggling to process current layout (consider simplifying to avoid recursive layout)"

I have not noticed any other issues with my UI or performance even with these errors.
So either
A) Unity needs to fix the right margin working with 100% width & height, & 0 shrink
B) User Disable or Unity Fix the unnecessary error dump
C) If A and B is Unity working correctly, then we need to figure out new code to get the margin version working
D) or going back to the "additional element" version which is what I've resorted to

edit: Reason for using Unity 2022.2 beta is getting ready for ECS 1.0. It's the only way to use ECS 1.0 at the moment.

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

No branches or pull requests

1 participant