Hey there,
Although you have failed to present any code (which makes helping you that much harder) I can give you a generalised answer.
All you need to do is base your GUI rendering on a boolean conditional, so that it can it can be rendered and unrendered from multiple inputs. So for example:
bool foo = false;
void OnGUI () {
if (GUI.Button(new Rect(10, 10, 10, 10), "Render")) {
foo = true;
} else if (GUI.Button(new Rect(30, 10, 10, 10), "Unrender")) {
foo = false;
}
if (foo) {
//Render your GUI elements
}
}
Hope that helps,
Klep
↧