소스 검색

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 년 전
부모
커밋
7f40b69022
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
 					Dictionary d;
 					d["@subpath"] = cp;
 					d["@subpath"] = cp;
-					d["@path"] = p->path;
+					d["@path"] = p->get_path();
 
 
 					p = base.ptr();
 					p = base.ptr();