MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / save_global_classes

Method save_global_classes

core/object/script_language.cpp:529–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529void ScriptServer::save_global_classes() {
530 Dictionary class_icons;
531
532 Array script_classes = ProjectSettings::get_singleton()->get_global_class_list();
533 for (const Variant &script_class : script_classes) {
534 Dictionary d = script_class;
535 if (!d.has("name") || !d.has("icon")) {
536 continue;
537 }
538 class_icons[d["name"]] = d["icon"];
539 }
540
541 List<StringName> gc;
542 get_global_class_list(&gc);
543 Array gcarr;
544 for (const StringName &E : gc) {
545 const GlobalScriptClass &global_class = global_classes[E];
546 Dictionary d;
547 d["class"] = E;
548 d["language"] = global_class.language;
549 d["path"] = global_class.path;
550 d["base"] = global_class.base;
551 d["icon"] = class_icons.get(E, "");
552 d["is_abstract"] = global_class.is_abstract;
553 d["is_tool"] = global_class.is_tool;
554 gcarr.push_back(d);
555 }
556 ProjectSettings::get_singleton()->store_global_class_list(gcarr);
557}
558
559Vector<Ref<ScriptBacktrace>> ScriptServer::capture_script_backtraces(bool p_include_variables) {
560 if (is_program_exiting) {

Callers

nothing calls this directly

Calls 5

get_global_class_listMethod · 0.45
hasMethod · 0.45
getMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected