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.
This commit is contained in:
Andrii Doroshenko (Xrayez) 2019-11-02 15:11:52 +02:00
parent 4569f5ec82
commit 7f40b69022
1 changed files with 1 additions and 1 deletions

View File

@ -1126,7 +1126,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
Dictionary d; Dictionary d;
d["@subpath"] = cp; d["@subpath"] = cp;
d["@path"] = p->path; d["@path"] = p->get_path();
p = base.ptr(); p = base.ptr();