mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 16:00:08 +01:00
* These changes allow the project to start and run in Godot 4.2 I hit some of the files with my formatter, if whitespace updates are not wanted I can remove those. The project doesn't entirely work yet, but it runs. I am still working on making it work properly fully, but at least it starts now instead of crashing. * Center text to match Godot 3 example better.
13 lines
220 B
GDScript
13 lines
220 B
GDScript
extends Button
|
|
|
|
@export_file var scene_to_change_to: String = ""
|
|
|
|
|
|
func _ready():
|
|
pressed.connect(change_scene)
|
|
|
|
|
|
func change_scene():
|
|
if scene_to_change_to != "":
|
|
get_tree().change_scene_to_file(scene_to_change_to)
|