system
1
hey guys I’m a real programming beginner and I’m looking for something special
i tried it also myself in different ways but the result was awful…
So thats what I’m looking for.
There is a cube a simple game object with collider
- if i klick at it there should be a text gui and a picture gui shown up
- if i click at maybe a button the gui’s should disappear
maybe it sounds to much but its my mane could for my game idea so its very important for the application.#
thx for your help
system
2
the OnMouseDown function should do the trick, set a boolean to activate and deactivate the gui everytime the object is clicked , and you should be good 
Ex:
var GUIActive : boolean = false;
var isGUIControl : boolean = false;//set this true for objects that control the gui
function OnMouseDown(){
if(isGUIControl){
GUIActive = !GUIActive;
}
}
and on the gui script you would use something like this
function OnGUI(){
var active : boolean = gameObject.GetComponent(//whatever you call that ^ Script).GUIActive;
if(!active) {
return;
}
//GUI stuff here
}