-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node duplication issue with @tool #98912
Comments
I haven't investigated, but if the owner is not set correctly, you'll be essentially making sub-scenes. |
@fire I was told about this, and I tried really different owners, or not using set_owner at all, but it didn't solve the problem |
Removing owner helps. Your problem is that you are adding a new child and set owner to the scene, so it gets saved. Then when you reload, the Though there is a bug here that when you add a new child with owner, it does not appear in scene tree until you reload the scene. Not sure why. |
@KoBeWi can you report the issue on the tracker here? |
The |
@KoBeWi In the GDExtension plugin I deleted the descendants, but it did not solve the problem :(
When I opened MRP today I also noticed another strange behavior, when selecting descendants in the node tree, all descendants are selected, and after renaming the editor closes 1108.mp4 |
I think #89442 will solve your issue.
Your nodes have the same name, hence the selection bug. |
Maybe GDExtension has no access to unexposed members. In that case you'd have to make a module instead. |
Tested versions
4.2, 4.3 stable
System information
Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - Radeon RX 560 Series (Advanced Micro Devices, Inc.; 31.0.14001.45012) - Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 Threads)
Issue description
I noticed a strange problem when duplicating nodes in the scene tree that were added by a plugin, I first encountered this problem in my plugin developed using GDExtension, now I decided to test this problem locally in the editor itself using GDScript plugins, and this problem repeated.
If we duplicate a node added using GDExtension or a plugin and
@tool
, then the node is duplicated twice, the more we duplicate this node, the more descendants it hasWhen reloading a project, extra nodes are sometimes shown in the editor, sometimes not, which is also quite strange.
Steps to reproduce
Minimal reproduction project (MRP)
bugdublicate.zip
The text was updated successfully, but these errors were encountered: