-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
UI Layout Or Size Can Seem To Shift Unnecessarily Post-Creation #15826
Comments
Does this happen across all platforms? Can you reproduce this on main? I suspect this is actually windowing related, where we're not getting the right window size soon enough. |
I know it occurs on macOS (every time it is spawned), and Linux [Fedora] (I've only seen it the first time it's spawned per run so far). I'll try to make an MRE, and then see if that works on main (I don't want to deal with migrating a whole game to main, especially when I probably should make sure this is reproducible first). |
I slowed a recording of this down WAY more and cut it to the moment it switches from ingame to menu to illustrate the strange 2 frames that make up this weirdness: Screenflick.Movie.81.mp4 |
Is there a chance that this is scale factor related? It looks like this is on a mobile phone emulator? Is it consistent every run? |
Nope it’s happening on my macOS build consistently in every run. Of course that also has a scaling factor but I seem to be able to corner it more down to when it got introduced. and it seems to be an instability related to cramping multiple elements in a column that define |
Speaking of which: https://github.com/DioxusLabs/taffy/releases/tag/v0.6.0 :) |
And as a result, #15844 :D I'd love if you could test with that PR. |
Bevy version
Bevy v0.14.2
What you did
We created a main menu for our game using straight Bevy UI.
What went wrong
On spawning the main menu UI, it shifts / changes during the frame after creation. The expectation is that it would spawn with the correct layout and size, not having to shift to accommodate or conform to what is wanted, since nothing should've changed from the values passed for initial creation.
Video showcasing what I'm talking about specifically:
https://github.com/user-attachments/assets/4c440f45-f723-4c69-ab23-92378c421262
Additional information
My best guess as to what this is, is some form of layout calculations being performed in Bevy UI?
We don't think it's any of our code that is causing this; it still occurs after disabling / removing any systems which may modify UI values post-creation. Tho, if this does end up being a fault in the code we wrote, rather than Bevy UI, or even just intended behavior, then sorry for making this issue and wasting time.
The text was updated successfully, but these errors were encountered: