mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Don't allow class_name in built-in scripts
This commit is contained in:
parent
145a45fd3f
commit
2ad302cec4
5 changed files with 8 additions and 8 deletions
|
@ -3500,7 +3500,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||
_set_error("'class_name' is only valid for the main class namespace.");
|
||||
return;
|
||||
}
|
||||
if (self_path.empty()) {
|
||||
if (self_path.begins_with("res://") && self_path.find("::") != -1) {
|
||||
_set_error("'class_name' not allowed in built-in scripts.");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue