- Home /
Information box
Hi, i would like to ask if have any example show how to create information box, that when i click on the object to request information, the information appear from right side of screenand open as drag box, later when i need to close click ESC button or double click what ever to close the box.
Are you asking people to do stuff for you? Or are you asking for help with your own thing? Post some code and we'll fix it up, ask us to do something for you and your question will be closed.
Well, i didn't asking people do stuff to me, you understand it is not my problem, this my code that i already done but i have to objects, what i need is find way to open window for each object separated.
#pragma strict
public var mostrar = false;
public var skin : GUISkin;
function Start() {
// Hide();
}
function Hide() {
guiTexture.enabled = true;
mostrar = false;
}
function Show(paper : Paper) {
if (!guiTexture.enabled) {
guiTexture.enabled = false;
}
}
function OnGUI(){
GUI.backgroundColor = Color.white;
GUI.skin = skin;
if(mostrar){
GUI.Box(new Rect(350,90,500,350),"Test");
}
}
second script
//var popupTexture : Texture2D;
public var paperPopup : PaperPopup;
// public var skin : GUISkin;
function Start () {
paperPopup = FindObjectOfType(PaperPopup);
// paperPopup.mostrar = ! paperPopup.mostrar;
}
function Update () {
paperPopup.mostrar = ! paperPopup.mostrar;
if (Input.Get$$anonymous$$eyDown ($$anonymous$$eyCode.Escape))
paperPopup.mostrar = false;
}
Your answer
Follow this Question
Related Questions
Anybody help me how to convert unity file in unity web player 1 Answer
turn on off particle system 1 Answer
Unity Texture import Setting For Android Game 0 Answers
Cloud recognition in Vuforia 0 Answers
Not Showing Tools Option in Unity Editor 3 Answers