mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-07 08:20:11 +01:00
10 lines
355 B
GDScript
10 lines
355 B
GDScript
extends Panel
|
|
|
|
|
|
func _on_goto_scene_pressed():
|
|
# Change the scene to the given PackedScene.
|
|
# Though it usually takes more code, this can have advantages, such as letting you load the
|
|
# scene in another thread, or use a scene that isn't saved to a file.
|
|
var scene := load("res://scene_a.tscn") as PackedScene
|
|
get_tree().change_scene_to_packed(scene)
|