summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--editor/script_create_dialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index daac755529..4f517abc97 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -390,6 +390,8 @@ void ScriptCreateDialog::_create_new() {
if (is_built_in) {
scr->set_name(internal_name->get_text());
+ // Make sure the script is compiled to make its type recognizable.
+ scr->reload();
} else {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
scr->set_path(lpath);