You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Add a keyword for abstract classes in GDScript
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
This commit is contained in:
@@ -219,6 +219,10 @@ bool CreateDialog::_should_hide_type(const StringName &p_type) const {
|
||||
i = script_path.find_char('/', i + 1);
|
||||
}
|
||||
}
|
||||
// Abstract scripts cannot be instantiated.
|
||||
String path = ScriptServer::get_global_class_path(p_type);
|
||||
Ref<Script> scr = ResourceLoader::load(path, "Script");
|
||||
return scr.is_null() || scr->is_abstract();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user