How to inherit ProjectSettings class to modify it?

Godot Version

4.4.1 stable

Question

` Currently I’m trying to figure out more how to utilise Global ( Autoloads) for purpose of changing resolution, specifically based on orientation of device .

In script I tried to go for

extends Node 

but this doesn’t allow use

sub_viewport.set_size_2d_override(Vector2i(width, height))

What should I extend to have access to display/window/size/viewport_width from script to match resolutions , orientations , and store grid sizes based on this with boundaries based as ratio to it ?



?
`

figure it out , it can globally extends so , but need to use it same as Engine. class

	ProjectSettings.set_setting("display/window/size/viewport_height", 1920)
	ProjectSettings.set_setting("display/window/size/viewport_width", 1920)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.