refactor: enhance test framework with automated resource tracking and scripted error capture capabilities

This commit is contained in:
2026-06-26 09:40:17 +08:00
parent 948a99cf90
commit 00f9d98f4b
58 changed files with 3594 additions and 1289 deletions
+9 -1
View File
@@ -430,7 +430,15 @@ func _current_scene_root() -> Node:
return null
var scene_root := tree.current_scene
if scene_root == null and Engine.is_editor_hint():
scene_root = EditorInterface.get_edited_scene_root()
# Look the editor singleton up by name rather than referencing the bare
# `EditorInterface` identifier: that identifier is compiled out of export
# templates, so the GDScript parser rejects it ("Identifier
# "EditorInterface" not declared in the current scope") in an exported
# build even though `Engine.is_editor_hint()` would never run it there.
# That parse failure stops this autoload from loading in every export.
var editor := Engine.get_singleton(&"EditorInterface")
if editor:
scene_root = editor.get_edited_scene_root()
return scene_root