浏览代码

Fix _ClassDB::get_method_list to returns only what's available when introspection is disabled

Emmanuel Leblond 7 年之前
父节点
当前提交
c1e2ed1d84
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      core/bind/core_bind.cpp

+ 6 - 0
core/bind/core_bind.cpp

@@ -2459,7 +2459,13 @@ Array _ClassDB::get_method_list(StringName p_class, bool p_no_inheritance) const
 	Array ret;
 
 	for (List<MethodInfo>::Element *E = methods.front(); E; E = E->next()) {
+#ifdef DEBUG_METHODS_ENABLED
 		ret.push_back(E->get().operator Dictionary());
+#else
+		Dictionary dict;
+		dict["name"] = E->get().name;
+		ret.push_back(dict);
+#endif
 	}
 
 	return ret;