浏览代码

Fix preload type regression

rune-scape 2 年之前
父节点
当前提交
17e03c29d6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      modules/gdscript/gdscript_analyzer.cpp

+ 2 - 1
modules/gdscript/gdscript_analyzer.cpp

@@ -4026,7 +4026,8 @@ GDScriptParser::DataType GDScriptAnalyzer::type_from_variant(const Variant &p_va
 					found = found->get_member(E).m_class;
 					found = found->get_member(E).m_class;
 				}
 				}
 
 
-				result = found->get_datatype();
+				result.class_type = found;
+				result.script_path = ref->get_parser()->script_path;
 			} else {
 			} else {
 				result.kind = GDScriptParser::DataType::SCRIPT;
 				result.kind = GDScriptParser::DataType::SCRIPT;
 				result.native_type = scr->get_instance_base_type();
 				result.native_type = scr->get_instance_base_type();