Topic was automatically imported from the old Question2Answer platform.
Asked By
Mxt08
Hi,
I am making a game that have a control root node and a color rect inside it.
But when I resize my window or try it in my mobile, the background doesn’t cover all the window. How I can fix this problem using gdscript?
Thanks in advanced.
Below scene tab bar, there is a “Layout” button. Click that, and select “FullRect” in its drop-down menu. This way the Control will resize with its parent, which is the game window (Technically the parent is SceneTree’s root node, a Viewport.).
Do the same to same to ColorRect. This way it will resize with its parent, which is that root Control.
Plus: Essentially, those “Layout” options are anchors and margins presets for all Control nodes.