This has been killing me for days. You see, i’m trying to make an aceptable Pause Menu in wich i have already made a button that takes the user to an Options Screen, and in that options screen i want to have a variety of toggles that can be showed enabled and disabled (change the state they are showing), but the problem i don’t know the basics of the GUI.Toggle as well as the GUILayout.Toggle (this is what i’m trying to use, i’ve already took a look at Scripting Reference…but the explanation is poor, only explains how to put text or an image, but nothing else).
I want, in this first case, to set a gameobject to enabled or disabled depending in a respective toggle (let’s call it ‘NevDensa’). The gameobject contains a Particle system which i tweaked to simulate a snow storm, but because it is maybe a bit performance expensive, i want rhe users to be able to enable or disable it as they need)
I’m not sure how to do that, because i don’t know how to switch between the two states, and worst of all…, whatever i’m running the game and try to click the toggle…the toggle remains always as active in the screen (i got it to successfully disable the gameobject i mentioned…but, it remains as activated in the screen, and i can’t click to enable the gameobject again…because the gameobject can’t be reenabled)
What i want to do would be…
Dense Snow Storm: (Here would be the toggle, activated by default, and when clicked, set the gameobject to false and…possibly change the visual text from ‘Enabled’ to ‘Disabled’ on screen?)
I hope i explained my situation clearly, but only to be sure…
[12037-question+about+toggles.jpg|12037]
Thanks in advance!