Hey there!
So, In the GUI I’m currently working on, I need to know if there’s a way to change the texture alpha value during runtime… Actually right now I’ve this:
function OnGUI() {
//some unrelated stuff here
//Hull Background
GUI.DrawTexture(Rect(Health.hull_area.x, Health.hull_area.y, Health.hull_area.width, Health.hull_area.height), Health.hull_bg);
//Hull Foreground
GUI.DrawTexture(Rect(Health.hull_fg_area.x, Health.hull_fg_area.y, Health.hull_fg_area.width, Health.hull_fg_area.height), Health.hull_fg);
//more unrelated stuff
}
Where inside the Health class I’ve the hull_bg and the hull_fg Textures. Is there anyway to make it transparent as the player takes damage, in order to gradually leave the background visible?
Thanks in advance.
JPB18