How to create layouts for both desktop and mobile in the same project?

Godot Version

v4.3.stable.official [77dcf97d8]

Question

I have a project that needs to export for both desktop and mobile. The problem I’m having is that mobile devices have a long narrow screen while desktop has a wide screen. As a result, on many screens I have to completely change how they are laid out depending on whether they are meant to run on desktop or mobile.

The Godot project settings lock you into a single window aspect ratio. So if I set my window dimensions to be for mobile, any component scene I try to lay out in the editor will also be based on the mobile window size. There doesn’t seem to be any way for me to design both mobile targeted screens and desktop targeted screens without creating a second project for desktop.

Is there a way around this? Are all my components locked into the project window size or can I have separate components for both platform targets?

You can read this page for learning more. Or also you can watch this video on it.

This is all about stretching the design window size with respect to the physical window. I was hoping more for a way to design a component that did not force it to have the same aspect as the design window size.

1 Like