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

Method script_class_is_parent

editor/editor_data.cpp:976–992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

974}
975
976bool EditorData::script_class_is_parent(const String &p_class, const String &p_inherits) {
977 if (!ScriptServer::is_global_class(p_class)) {
978 return false;
979 }
980
981 String base = p_class;
982 while (base != p_inherits) {
983 if (ClassDB::class_exists(base)) {
984 return ClassDB::is_parent_class(base, p_inherits);
985 } else if (ScriptServer::is_global_class(base)) {
986 base = ScriptServer::get_global_class_base(base);
987 } else {
988 return false;
989 }
990 }
991 return true;
992}
993
994Variant EditorData::script_class_instance(const String &p_class) {
995 if (ScriptServer::is_global_class(p_class)) {

Callers 9

popup_quick_openMethod · 0.80
_is_drop_validMethod · 0.80
_file_selectedMethod · 0.80
_update_menu_itemsMethod · 0.80
_is_type_validMethod · 0.80
_files_droppedMethod · 0.80
_is_type_preferredMethod · 0.80
_should_hide_typeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected