Open pc9098 opened 1 year ago
If you want a workaround, resources are made unique when nodes are copied to another scene. So you can copy your nodes somewhere else and copy back.
If you want a workaround, resources are made unique when nodes are copied to another scene. So you can copy your nodes somewhere else and copy back.
Thanks. I did not know that. Since that workaround is pretty unintuitive I'm going to keep this post because having that option would be more practical
I also advocate for the possibility of unique duplicates (including all sub-resources). Ideally in the form of the shortcuts Ctr+D and Ctrl+Shift+D.
Today I also faced a similar issue. Using Ctrl+D to duplicate grass instead of Instancing new grass scene made all duplicated grass destroy together when one of them is destroyed. This behavior is very unintuitive for me.
I think this problem should be handled like blender does Ctrl+D to Duplicated Object (make a full duplicate of all objects recursively) and another Alt+D or Ctrl+Alt+D to Duplicate linked (what Godot does right now)
Manually creating (even using Ctrl+Shift+A) and selecting a scene each time is tedious
Thanks
A sub-issue due to this is if I assign the grass.gd script a class_name
Grass
and use the Make Sub-Resources Unique
option in the inspector for those Ctrl+D'ed grasses to make them unique (as some threads on the internet suggest doing), the script is duplicated too (with the same class_name
), and causes a global class-name overshadow error, right at the launch of the game. This will happen for any scripts using class_name
Therefore, this is not a solution
Just wanted to add that the same behavior is found when using Node.duplicate(all_flags) during runtime too. This becomes an issue when needing to duplicate area3d packed scenes. The duplicate returned by Node.duplicate() still shares collision shape resources in their collision shape child nodes.
Just wanted to add that the same behavior is found when using Node.duplicate(all_flags) during runtime too. This becomes an issue when needing to duplicate area3d packed scenes. The duplicate returned by Node.duplicate() still shares collision shape resources in their collision shape child nodes.
This is already being tracked in https://github.com/godotengine/godot-proposals/issues/317, https://github.com/godotengine/godot-proposals/issues/8876 and https://github.com/godotengine/godot/issues/74918.
Describe the project you are working on
2D game similar to nuclear throne
Describe the problem or limitation you are having in your project
When I copy several nodes and paste them I have to select one of them and make its resources unique and then the next one, and then the next, etc
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Make sub-resources unique could also work for several selected nodes
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
the "Make sub-resources unique" in the Inspector will also show up if several nodes are selected
If this enhancement will not be used often, can it be worked around with a few lines of script?
The only workaround is going one by one, which is impractical
Is there a reason why this should be core and not an add-on in the asset library?
This change will affect all of us in a better way, so it would be better if all had it
Bugsquad edit (keywords for easier searching): MultiNodeEdit