Explorar o código

Merge pull request #21886 from RyanStein/bugfix-15509

Check for double-colon on open recent script.
Rémi Verschelde %!s(int64=7) %!d(string=hai) anos
pai
achega
772b398ad8
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      editor/plugins/script_editor_plugin.cpp

+ 7 - 0
editor/plugins/script_editor_plugin.cpp

@@ -504,6 +504,13 @@ void ScriptEditor::_open_recent_script(int p_idx) {
 			return;
 		}
 		// if it's a path then its most likely a deleted file not help
+	} else if (path.find("::") != -1) {
+		// built-in script
+		Ref<Script> script = ResourceLoader::load(path);
+		if (script.is_valid()) {
+			edit(script, true);
+			return;
+		}
 	} else if (!path.is_resource_file()) {
 		_help_class_open(path);
 		return;