0 votes

Couldn't find it in Help by search.
I work with scripts now instead of scenes, and thats the problem now. I want to change shaders param, but every mesh using this material also changes this param. Sollution in editor is simple - make unique. How can I do this by code , or is there other way around ?

Godot version godot 3.2 stable
in Engine by (7,925 points)

1 Answer

0 votes

Any Resource type can be copied using its duplicate() function. Duplicating the material and assigning it to your node is essentially what "make unique" does.

by (1,307 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.