From 700d07cf7cae4e28de107e0c274b27c857d98450 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 9 Mar 2018 23:34:32 +0100 Subject: Mono: Avoid invalid class names. Disallow reserved keywords as class names and prefix base class with the Godot namespace if it's the same as the class name. Fixes #12483 --- editor/script_create_dialog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'editor/script_create_dialog.cpp') diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index b893b098a..e45ad1e78 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -434,6 +434,13 @@ void ScriptCreateDialog::_path_changed(const String &p_path) { return; } + String path_error = ScriptServer::get_language(language_menu->get_selected())->validate_path(p); + if (path_error != "") { + _msg_path_valid(false, path_error); + _update_dialog(); + return; + } + /* All checks passed */ is_path_valid = true; -- cgit v1.2.3-70-g09d2