Skip to content

Commit

Permalink
Reload built-in script after create to allow dropping nodes into it
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Sep 6, 2023
1 parent f7c48cf commit d32348c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/script_create_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d32348c

Please sign in to comment.