1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-30 18:30:54 +00:00

Ensure scene paths in autoload settings

This commit is contained in:
kobewi
2025-12-24 22:59:58 +01:00
parent 63227bbc8a
commit f63186f707

View File

@@ -393,7 +393,7 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
// Cache the scene reference before loading it (for cyclic references) // Cache the scene reference before loading it (for cyclic references)
Ref<PackedScene> scn; Ref<PackedScene> scn;
scn.instantiate(); scn.instantiate();
scn->set_path(p_path); scn->set_path(ResourceUID::ensure_path(p_path));
scn->reload_from_file(); scn->reload_from_file();
ERR_FAIL_COND_V_MSG(scn.is_null(), nullptr, vformat("Failed to create an autoload, can't load from UID or path: %s.", p_path)); ERR_FAIL_COND_V_MSG(scn.is_null(), nullptr, vformat("Failed to create an autoload, can't load from UID or path: %s.", p_path));