|
Hi, I've got a problem with showing and hiding GUI textures. When I click a button I want it to hide and a different one to show. On the original button I have this code: And on the other button I have this code: Can anyone tell me where I'm going wrong?
(comments are locked)
|
|
You can't find an inactive object with Find, and even if you could, I suspect that it would not answer to SendMessage.
function OnMouseDown() {
guiTexture = false; // or use "gameObject.active=false;" as before
gameObject.Find("EasyButton").guiTexture.enabled = true;
}
You don't need the other button's script in this case. Thank you! This worked perfectly.
Jan 09 '12 at 07:30 AM
Pixelen
(comments are locked)
|
|
Use something like this:
(comments are locked)
|
