LIght Up Keys

I must confess to my limited ability’s with shaders, thusly I am forced to ask for your help.

My goal is to make a shader or two for illuminated piano keys, so that when you press them, the material swaps out to one with a glow like those electric pianos with lights in the keys. Each key is a different color for easier differentiation. In a worse case scenario since this is not a big deal, I was just going to use a variety of textures and swap those out of the instanced materials, but this is probably an inelegant solution.

If anybody happens to have advice, I would appreciate some guidance.

As you wrote, I’d personally go for the “swap the entity” solution: quick, effective, elegant.

swapping the material or object is likely to be more elegent, quicker and better.

That’s what I did, thanks for affirming the idea. If you two think it’s a good idea, I have no choice but to agree and go with it.

I also think so.

You can change the Prefab, Material, Texture, Shader, Shaders individual color or emissive value…whatever suits you.