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

Duplicating nodes should create unique curves #12

Open
TokisanGames opened this issue May 1, 2021 · 4 comments
Open

Duplicating nodes should create unique curves #12

TokisanGames opened this issue May 1, 2021 · 4 comments

Comments

@TokisanGames
Copy link

I have created a river with a texture I like. Since there's no way to copy the material, which would be a nice feature, I duplicate the node.

However this only sometimes gives me a unique curve.

Today I duplicated the node several times trying to get a unique curve, saving at different times, closing the scene, etc. Nothing I could do in the editor would give me a unique curve, which meant if I edited the curve in one node, it changed the other.

The only way I could fix this today was to edit the .tscn file and manually create a unique subresource so I could have an additional node.

However the very first time I did this, weeks ago it duplicated and I didn't notice any issue. I wasn't able to pinpoint the behavior that caused it to make it unique or not, but this is a needed function that should done be automaticly.

Win10/64
Godot 3.2.1
GTX1060
GLES3
7fbac12

@sairam4123
Copy link

Well, it's a issue with Godot, godot shares the resources with other nodes you duplicate. So it's a godot issue not this plugin's issue.

@Arnklit
Copy link
Owner

Arnklit commented Jun 11, 2021

Sorry for the delay on answering this.

It is basically expected that the resources are shared, because that's how Godot works in general. But I am aware that it's an issue.

I'll see about moving the material and curve over to a resource in some way so it can be copied and made unique in a way that makes sense.

@TokisanGames
Copy link
Author

TokisanGames commented Jul 12, 2021

Perhaps if there is an on_duplicate signal you can connect to, or just having a button in the interface for manual control, and either allows you to make unique the curve resource. As it is editing the scene file by hand to force a unique copy is not ideal.

Or you could expose the curve resource in the inspector. Then it will have the manual make unique option built-in. Then you just need documentation to explain the process.

@TokisanGames
Copy link
Author

There are several notifications sent out on various events. You could capture NOTIFICATION_INSTANCED, NOTIFICATION_READY, or NOTIFICATION_ENTER_TREE and then:

var curve = curve.duplicate()

That way every instance is making itself unique on every run in the editor or game.

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

No branches or pull requests

3 participants