How do you setup a pixel game with different resolutions for different scenes?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By OkayRex

I want to make a game where the overworld scenes are at 320x180 and the battle scenes are at 640x360. What is the best way to do this in Godot?

My project settings is at 640x360 with Stretch Scaling to 2. I tried to change the Stretch Scaling in code, but do not know how to do it.

:bust_in_silhouette: Reply From: RinAkumetsu

Try to use several Viewport nodes. There is an article about resolutions and different settings: Multiple resolutions — Godot Engine (stable) documentation in English
And there is even an example project at the end of the article. I hope it helps you!