Hello! I have a prefab and instances of them. The instance is using the same material/shader. What I need to do, if I want to change a shader for only one instance? While changing shader of any instance all changes are transforming to other instances without applying changes. For example I have barrels in the level, I need to change the color of some barrels, not all, how can I do that?
Thank you.
If you make a change to ‘material’ at runtime, it automatically clones the sharedMaterial so that it becomes a reference to a unique Material. Because of this, you can make whatever changes you need to do without worrying about them propagating to the other objects in the scene! One thing to look out for here, is make sure you are modifying the instance, not the prefab.