Assigning a viewport to a screen

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By John
:warning: Old Version Published before Godot 3 was released.

Hello, The Viewport documentation page states:

viewports can be assigned to different screens in case the devices have multiple screens.

I can’t find any information about how to do this. Does anybody know how this can be done?

:bust_in_silhouette: Reply From: avencherus

John, you may be looking for OS.set_current_screen(#)

You’ll find more here in the OS Singleton: OS — Godot Engine (stable) documentation in English

Thanks for the reply. There is no description for set_current_screen, but I would guess it changes the monitor your window draws to? My reading of “viewports can be assigned to different screens” was that we could have multiple screens with multiple viewports.

John | 2017-09-20 17:35

That would be my interpretation here, as well. Which would be awesome, but is not usually a feature game engines offer.

TheSHEEEP | 2017-09-21 07:26

Unity supports multiple cameras on multiple monitors. For our purposes, we mix 2D and 3D cameras in a viewport and our hardware has multiple monitors.

John | 2017-09-21 15:52