summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-11-02 15:11:52 +0200
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-11-02 15:11:52 +0200
commit7f40b6902288d4e6406412985260c36a57d56943 (patch)
tree79a5a26f102a28ea3fddfcb4e4052cc692417faf
parent4569f5ec82964e0abe543337c9537e0af9164c11 (diff)
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.
-rw-r--r--modules/gdscript/gdscript_functions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index 185eb6c3fc..bbafef68ed 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();