Skip to content

Instantly share code, notes, and snippets.

@dwdvIl
dwdvIl / game_viewport.tscn
Last active November 30, 2024 23:34
[Add-on, Godot 4.3] Game Viewport with custom resolution for main scenes (with background!)
[gd_scene load_steps=2 format=3 uid="uid://8syhpi57ht3g"]
[sub_resource type="GDScript" id="GDScript_xp7q5"]
resource_name = "GameView"
script/source = "@tool
extends SubViewportContainer
## Height of the viewport, the width is determined by aspect_ratio
## If free_aspect is true, then it's based on the aspect ratio of the window
@export_range(1, 16384) var resolution:int = 720 :