#Accessing scale_mode via code ?

1 messages · Page 1 of 1 (latest)

burnt flower
#

Hello, how can I change the scale mode (display/window/stretch/scale_mode) of the project via code and have it take effect ?
ProjectSettings.set_setting("display/window/stretch/scale_mode", "integer") seems to have no effect on the rendering :(

vast cobalt
#

ProjetSettings are usually just read once at startup, so any changes to them at runtime have no effect.
I think it's possible to get the main window from the SceneTree using get_tree().root
And then use some method from the Window class to manipulate it..

burnt flower
#

I didnt find any property or method in Window or Viewport related to that :(

vast cobalt