i am new to unity my probelm is i am using a gui.toggle button named as MALE and FEMALE my need is when i select Male button male texture should display when i click FEMALE button female texture should display. But toggle button is not working properly .I have used renderer as cube
Design3.com is right, don't use 2 variables for the same inforamtion.
use this with the example code from Design3
or what would be better in such a case, use a ToolBar.
To make a vertical toolbar use a SelectionGrid with xCount = 1
answered Feb 07 '11 at 05:07 PM
I think you need to use one toggle instead of two. As it is, you have four potential combinations: male TRUE, female TRUE; male FALSE, female FALSE; male TRUE, female FALSE; and male FALSE, female TRUE.
Use one toggle ("genderToggle") and:
Also your GUI code has some errors. It should be:
By using "toggleMale" instead of "togglemale", you declared a new variable instead of referring to the variable you declared at the top of the script.
answered Feb 02 '11 at 09:29 PM