This is pretty much the default shader with the exception of changing the Albedo. The shader works on objects just fine. It also works on buttons in the scene view. When I switch to game view, the button image disappear. The button is still active but no image is being rendered.
Does anyone have any idea how I can fix this? Thank you.
I attached the UI-default shader to a material and then attached the material to a button. I made some changes that affected the button rendering. One thing I noticed is that even though this shader was only attached to a single button, its effect is being applied to all GUI elements. This doesn’t seem very logical.
I am just starting out with shaders so I am probably missing something. Is there a way to avoid this?
Did you overwrite the UI-Default.shader instead of copying it and modifying the copy?
That’s the shader that’s applied by default if you don’t assign a material, so if you overwrote it, it will get applied to everything like you said.
That still leaves the question of why the default shader got overwritten with your custom one and you ended up with all greyscale UI sprites. Perhaps you saved it before changing the shader name at the top?
Or does it work now that you’ve repeated the steps.