RMGUI Vs. UGUI Resizing

Опубликовано: 23 Июль 2026
на канале: Lacuna Corporation
379
2

When resizing in Unity, the unmanaged backend tracks the true window resolution separately from the managed layer. The reason it matters is that it tracks it incorrectly, and several systems use this bad data, UGUI being one of them. For this reason, when you resize a window in Unity, UGUI experiences extreme jitter, which is made worse by the fact that the UI is first rebuilt for the incorrect resolution, but then drawn to the correct final resolution, resulting in UI which is not only wrong for the final resolution, but is then stretched to match it.

RMGUI works around this problem by detecting the true resolution at an entry point where Unity is guaranteed to have internally assigned it's final RT for that frame, which has the correct target resolution. Resizing is detected at this point, and if a mismatch is detected, it is immediately rebuilt and then resubmitted for rendering. This can potentially result in double builds for dirty frames, but this only happens if the UI is already dirty and is then further dirtied by a resolution change. Even in this case, I'm still hitting upward of 3500FPS in this demo.