mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Reload built-in script after create to allow dropping nodes into it
This commit is contained in:
parent
f7c48cf803
commit
d32348c686
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue