| 974 | } |
| 975 | |
| 976 | bool 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 | |
| 994 | Variant EditorData::script_class_instance(const String &p_class) { |
| 995 | if (ScriptServer::is_global_class(p_class)) { |
no outgoing calls
no test coverage detected