Jelajahi Sumber

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.
Andrii Doroshenko (Xrayez) 5 tahun lalu
induk
melakukan
7f40b69022
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      modules/gdscript/gdscript_functions.cpp

+ 1 - 1
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();