I have a chest that fades away when it has been looted. This works fine. However to get it to work I am using the “Transparent/Bumped Specular” shader which does not seem to allow me to turn OFF the transparency at all. So the model is “semi-transparent at all times”.
Is there a better way to handle this? To get it to fade I am adjusting the Color.a value on updates. Again it is fading perfectly.
Your post seems contradictory. You say “to get it to work” you use Transparent/Bumped Specular shader, which, you say, does not allow you to turn transparency off. Which means it doesn’t work.
Also at the end of the post you say, “Again it is fading perfectly.”
What are we supposed to make of this?
If you explain your problem a lot more clearly, I think you might get some answers.
Sorry if I was not clear, and you are right it is nor working as designed.
I have a chest which I want to fade when looted. From what I am hearing the best option is to set an opaque shader, then when the chest is empty, switch the shader for a transparent one and change the Color.a value on Update.
Swapping a texture withing a materials array: EricsPelvis.renderer.materials[1].SetTexture("_LightMap", Texture_eric_home_number);
OBJECT.GetComponent(SkinnedMeshRenderer).materials[2].mainTexture= Texture_eric_home_sleeves;
Finally here is an example from MBO Baseball (we normally have our FIND routines in the start function for performance). GameObject.Find("Ana-RB-Geometry").GetComponent(SkinnedMeshRenderer).materials[2].mainTexture= Texture_ana_home_name;
This sounds like your texture contains an alpha channel that is not set to completely opaque. Transparent shaders not only allow you to influence transparency through the texture’s main color but also take texture transparency into account. So if you use a half transparent texture you are never able to make the object completely opaque.