-
-
Notifications
You must be signed in to change notification settings - Fork 19.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
ParticlesMaterial in Particles2D cannot be made unique #18948
Comments
How did you check that it was not made unique? |
In the example project: make the material unique. The script runs and sets only 1 of the Particle2Ds to a different shape size. Both change size. Also when you make it unique the material changes name (in the right panel). After you close+reopen the name reverts to its previous value, indicating that this value was not saved. |
I have noticed this with SpatialMaterial too, duplicate a mesh with a material, try to make unique and modify some parameters and you'll see it may not be unique. |
Yes I believe it has happened to me on some other materials, maybe Shape2D and something else? ParticlesMaterial is the one I noticed and could easily duplicate though. Pretty serious bug in my opinion |
Don't you mean to set it "Local to scene" rather than unique? Local to scene would auto-duplicate it when loading the scene, while make unique would ensure it is not shared with other scenes (nothing said about other instances of the scene). |
Make unique used to create a new resource (duplicated) in the same scene on duplicated nodes, now that option fails with some resources. |
I've noticed this happens with materials and shaders, which can be difficult when trying to set_shader_params. You have to duplicate the materials/shaders in code before setting params. |
For a quick workaround, one may use duplicate on
|
According to my tests, this is fixed on master branch. |
I've come across the same issue on v3.2.2.stable.official. Saved 2 different Particle Resources with 2 different names, both made unique. When I change the color ramp on one, save close, open the other, both have been changed. Edit: After duplicating the resource, that duplication seems to be unique. |
I've also encountered this bug: https://github.com/opyate/ggj2022-solo-entry/blob/bug_process_material_is_not_unique/scenes/player/Player.gd#L168 Both players get the same colour in their particle emitter. (Particles are emitted when they land on the ground, after jumping/falling) (Here's my workaround, by duplicating the entire scene, one for each colour.) v3.4.4.stable.official [419e713] |
@opyate Please open a new issue with a minimal reproduction project attached. |
Seeing this behavior in godot 4.2.stable. No matter what I do, I cannot make the GPUParticles2D.ParticleProcessMaterial unique. Changes to one instance are effecting all other instances. The duplicate workaround works. I don't have a repro available. Changing the gravity for one instance changes it for all instances. |
Please open a new issue with a reproduction project attached 🙂, but I can't replicate this myself with this, in what way does it not work to press |
Godot version:
3.0.2
OS/device including version:
Win10
Issue description:
When clicking "Make Unique" for a ParticlesMaterial, the setting does not last after saving and closing the scene. Upon reopening/running it will not be unique. Workaround is to duplicate the material in code
Steps to reproduce:
Try to make a Particles2D's material unique in the editor. Save + close the scene, reopen. Will not be unique.
Minimal reproduction project:
New Game Project2.zip
Comment out this line in
Node2D.gd
to test:$Particles2D.process_material = $Particles2D.process_material.duplicate()
. I left it in to show that the scripting workaround actually works.The text was updated successfully, but these errors were encountered: