|Topic was automatically imported from the old Question2Answer platform.
With the settings of:
- Stretch Mode: 2D
- Aspect: Keep
My project displays an area outside the viewport to either side.
Changing the settings to:
- Stretch Mode: 2D
- Aspect: Ignore
solves this issue. However, I get the following warning every time the screen resizes:
_update_root_rect: Font oversampling only works with the resize modes ‘Keep Width’, ‘Keep Height’, and ‘Expand’.
<C++ Source> scene/main/scene_tree.cpp:1153 @ _update_root_rect()
I have tried disabling this warning under Project → Project Settings → Debug → GDScript, but even disabling all warnings does not prevent it from showing up in the debugger. What does remove the warning is disabling Font Oversampling in Project → Project Settings → Rendering → Quality → Font Oversampling. However, the text of the project then looks low quality and does not scale well with larger screens.
The warning seems to suggest oversampling does not work with the viewport settings I have chosen, however it seems to work just fine. The project is as I would like it now - I would just like to remove the warning I am seeing, or have a way to show only what is in the viewport in the editor when the game is launched with Font Oversampling activated.
I don’t entirely know why it’s giving you that warning even when you disabled all the warnings. The reason could be due to your Viewport using a stretch mode (as detailed in this issue).
Ertain | 2020-04-26 23:35
I saw that post too, but unfortunately if I change the stretch mode to to disabled, the project won’t work resize with the window, meaning it either crops the scene if the window is bigger than the default resolution or it shows large blanks if it is larger than the default resolution. Using the “viewport” setting for stretch mode still generates the warning.
Trollend | 2020-04-26 23:42