UGTK / Toolkit / Ui Module / Resolution System Completed
Resolution System
Summary
The Resolution System provides a simple and practical way to let players change the game's screen resolution directly from a UI dropdown. It is designed to work with TextMeshPro dropdown components and automatically applies the selected resolution while preserving the current fullscreen mode.
Content
Modules Dependencies
The Resolution System module requires the following dependencies:
- DropDownExtension: Add the event On Value Changed to the dropdown.
- Unity Text Mesh Pro
Ensure that these dependencies are correctly imported and configured in your project.
Setup
To set up the Resolution System, follow these steps:
Resolution System Setup
- Add the prefab
ResolutionDropdownin your canvas:
- Populate the dropdown options with supported resolutions (for example:
1920x1080,1280x720,2560x1440):
How To Use
Public methods that are avaible to use:
- ChangeResolution(): Reads the currently selected dropdown option, extracts width and height values, and applies the selected screen resolution.
resolutionSystem.ChangeResolution();TheChangeResolution()method is already assigned to theOnValueChanged(string)UnityEvent of theDropDown_Extensionscript by default.
Testing Scene
Open ResolutionSystemSceneTest in the module's Debug/ folder.
What to do, in order:
- Press ChangeResolution() in Play Mode and read the values in the inspector.
- Build a player and do the same there.
- Try a resolution the monitor does not support.
Step 2 is not optional: the editor's Game view follows its own aspect-ratio menu and ignores
Screen.SetResolution entirely, so the numbers change while the picture does not. Only a built
player tells the truth.
The recording is the scene's dropdown: it fills itself with the resolutions the system reports and
switching to one of them takes. Watch what the picture does while you do it - nothing. That is
step 2's point, visible here: the Game view follows its own aspect-ratio menu and ignores
Screen.SetResolution, so in the editor the value changes and the image does not. Only a built
player tells the truth.
Technical Info
The following are the main scripts and workflow of the Resolution System. Refer to the UML section for the detailed structure.
Scripts:
- Mn_ResolutionSystem: script applied to a dropdown that automatically applies the selected resolution while preserving the current fullscreen mode..
- Mn_UGTKDropDown_Extension: Add the event
OnValueChanged(string)to the dropdown..
© 2026 Marcello De Bonis. All rights reserved
Depends on 1
Used by 0
- No other module depends on it.
Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 1 module in total.
UGTKengine within an engine


