Skip to content
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

Allow using Make Sub-Resources Unique when selecting multiple nodes #6326

Open
pc9098 opened this issue Feb 19, 2023 · 7 comments
Open

Allow using Make Sub-Resources Unique when selecting multiple nodes #6326

pc9098 opened this issue Feb 19, 2023 · 7 comments

Comments

@pc9098
Copy link

pc9098 commented Feb 19, 2023

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
image_2023-02-20_004151378

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
image_2023-02-20_004133050

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

@KoBeWi
Copy link
Member

KoBeWi commented Feb 19, 2023

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.

@pc9098
Copy link
Author

pc9098 commented Feb 20, 2023

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

@Calinou Calinou changed the title Make selected node's sub-resources unique Allow using Make Sub-Resources Unique when selecting multiple nodes Feb 20, 2023
@EmilPastelka
Copy link

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.

@HarshNarayanJha
Copy link

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

@HarshNarayanJha
Copy link

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

@RudyFisher7
Copy link

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.

@Calinou
Copy link
Member

Calinou commented Nov 6, 2024

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 #317, #8876 and godotengine/godot#74918.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants