From 7f40b6902288d4e6406412985260c36a57d56943 Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Sat, 2 Nov 2019 15:11:52 +0200 Subject: [PATCH] Use GDScript resource path over script path for `inst2dict` The resource path holds the original path which can be used to convert a dictionary to instance consistently both within editor and exported projects as the original path is automatically remapped from `gd` to `gdc` or `gde` in exported projects. --- modules/gdscript/gdscript_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp index 185eb6c3fc7..bbafef68ed2 100644 --- a/modules/gdscript/gdscript_functions.cpp +++ b/modules/gdscript/gdscript_functions.cpp @@ -1126,7 +1126,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ Dictionary d; d["@subpath"] = cp; - d["@path"] = p->path; + d["@path"] = p->get_path(); p = base.ptr();