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

Method get_orphan_subclass

modules/gdscript/gdscript.cpp:3007–3019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3005}
3006
3007Ref<GDScript> GDScriptLanguage::get_orphan_subclass(const String &p_qualified_name) {
3008 HashMap<String, ObjectID>::Iterator orphan_subclass_element = orphan_subclasses.find(p_qualified_name);
3009 if (!orphan_subclass_element) {
3010 return Ref<GDScript>();
3011 }
3012 ObjectID orphan_subclass = orphan_subclass_element->value;
3013 Object *obj = ObjectDB::get_instance(orphan_subclass);
3014 orphan_subclasses.remove(orphan_subclass_element);
3015 if (!obj) {
3016 return Ref<GDScript>();
3017 }
3018 return Ref<GDScript>(Object::cast_to<GDScript>(obj));
3019}
3020
3021Ref<GDScript> GDScriptLanguage::get_script_by_fully_qualified_name(const String &p_name) {
3022 {

Callers 1

make_scriptsMethod · 0.80

Calls 2

findMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected