diff options
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r-- | editor/filesystem_dock.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 5041441ac3..684942dbad 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1782,6 +1782,14 @@ void FileSystemDock::_resource_created() const { Resource *r = Object::cast_to<Resource>(c); ERR_FAIL_COND(!r); + PackedScene *scene = Object::cast_to<PackedScene>(r); + if (scene) { + Node *node = memnew(Node); + node->set_name("Node"); + scene->pack(node); + memdelete(node); + } + REF res(r); editor->push_item(c); |