- Home /
GUI toggle help
I am using GUI toggle button and GUI style together but some reason gui toggle is not working.
Code: bool btBoy = GUI.Toggle (new Rect(350,80,90,90), btBoy, boyContent, genderStyle);
In the genderStyle i have used only Normal and On Normal functionality.
Any help would be much appreciated.
Thanks
If i add GUISTyle to the GUIToggle, it loses its toggle functionality. But an removing the GUISyle, toggle is working just fine. I, basically want to provide a visual feedback when a user selects a toggle button.
Answer by mohitmax · Jul 05, 2012 at 05:21 PM
I tried using a simple gui toggle without any return value.
GUI.Toggle (new Rect(350,80,90,90), btBoy, boyContent, genderStyle);
with Hover in gui genderStyle...the toggle button is still not showing.
Answer by mohitmax · Jul 05, 2012 at 05:20 PM
Thanks.
I tried that even then the toggle button is not working. If i take out the guistyle..toggle is working just fine.
Do not post comments as answers. Use the 'add new comment' button helpfully provided.
sorry about that. will keep that in $$anonymous$$d. but nay idea why the toggle "check/uncheck" mark is not visible with guistyle. The guistyle features are working...as in Hover, On Normal..but the "check/uncheck" mark is not visible.
Your answer
![](https://koobas.hobune.stream/wayback/20220613073743im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
GUI style causing problem 0 Answers
Is it possible to detect which GUIStyleState is used? 2 Answers
GUI custom textfield cursor rendering 2 Answers