Files
romants/addons/godot_debug_environments/debug_environment_watcher.gd
2024-10-05 13:12:42 +02:00

11 lines
330 B
GDScript

extends Node
func _ready() -> void:
# Get loaded scene
var node = get_tree().current_scene
# Check if debug environment is stored
var path = DebugEnvironmentLib.get_debug_path(node)
if not FileAccess.file_exists(path): return
# Replace instance with debug environment
get_tree().call_deferred("change_scene_to_file",path)