瀏覽代碼

Fix warning when editor resource preview try to read pluginscript resource

Emmanuel Leblond 7 年之前
父節點
當前提交
58f3ad69c7
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      modules/gdnative/pluginscript/pluginscript_language.cpp

+ 5 - 1
modules/gdnative/pluginscript/pluginscript_language.cpp

@@ -45,7 +45,11 @@ void PluginScriptLanguage::init() {
 }
 
 String PluginScriptLanguage::get_type() const {
-	return String(_desc.type);
+	// We should use _desc.type here, however the returned type is used to
+	// query ClassDB which would complain given the type is not registered
+	// from his point of view...
+	// To solve this we just use a more generic (but present in ClassDB) type.
+	return String("PluginScript");
 }
 
 String PluginScriptLanguage::get_extension() const {