Hello. I make a dissolve shader and put it on enemy prefab. When he dies it dissolves. Buut when one die all enemies in scene dissolve. Can i make unique materials on each enemy with script,on start maybe? (I'm working with 2D)
Hi and welcome, You need to have an unique instance of the material. How are you changing the material, can you share that part of the code?
Here's a few lines of code, I think this should do the trick. Code (CSharp): Renderer m_renderer = GetComponent<Renderer>(); m_renderer.material.SetFloat("_aFloatValue", 1.0f); m_renderer.material.SetColor("_Color", Color.blue);