how can i create a 2D pop up box like Angry Bird games, when we want to quit the game. it will pop a image either you click right and x button.. sorry im a newbie with unity..thanks
Your post is probably too general for UnityAnswers. The UnityAnswers philosophy is:
"[Unity Answers] is a place to ask specific questions that have specific answers. The forum is a better place to post discussions and non-technical questions."
As a general rule, posts should probably have the following:
A clear question (what, specifically, are you trying to do?)
Relevant background information (what have you already tried? what other things might be important for us to know?)
Context information (what do you expect to happen? What is happening instead?)
If your post is one of the following, you should consider changing it or asking on the forums instead:
A one- or couple-sentence post, especially with a broad question ("how do I make a game like Halo?") or no discernible question ("WebPlayer doesn't allow me to save to disk"). We'll need more specific information to help you.
Asking the opinion of the community ("Best method to store files?"). Much better to discuss these on the forums.
A question that focuses on the end result, rather than anything technical ("how do I make a laser beam?"). These mean that you probably haven't done enough research. If you're just starting out and don't even know where to look, try searching here, the forums, and Google first and then posting your question to the forums. The Unity resources are a great place to start (http://unity3d.com/support/resources/). When you get to a more technical point ("how do I adjust the color of a line renderer for a laser beam?") we can probably help you.
A disjointed or incomplete question ("How do I make a jumping enemy? Physics doesn't look right."). It will help us if you take a moment to add some context information, background, and general explanation.
Of course, the members here are awesome folks and will probably try to help you anyway - hopefully you'll get an answer or some helpful comments. If not, now you know why.
Answer by royce3
Jan 09, 2012 at 11:15 PM
The GUI interface in Unity makes that really easy.
Create an empty GameObject and add a script with something like the following:
Rect _quitWindowRect = new Rect ( Screen.width/2-125, Screen.height/2-25, 250, 50 );
if ( quitRequested )
GUI.Window ( QUIT_WINDOW_ID, _quitWindowRect, QuitWindowFunction, "Quit?" );
void QuitWindowFunction ( int id )
if ( GUI.Button ( new Rect ( 10, 10, 100, 30 ), "yes" )
// TODO: shut down the game...
if ( GUI.Button ( new Rect ( 120, 10, 100, 30 ), "NO!!" )
// TODO: return to game
Answer by faez
Jan 10, 2012 at 03:53 AM
thanks for your answer royce3...
you're welcome. Would you please go ahead and accept my answer?
Answer by Akmal
Jan 18, 2012 at 10:44 PM
that coding got error... it say (UCE0001: ';' expected. Insert a semicolon at the end.)
I was merely showing you the structure of code needed. If you need tutorials on how to write code you should search the web for such.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
7 People are following this question.
Just downloaded Unity and my 30-day trial is already expired?
Please help I don't understand what is wrong.
OnTriggerExit overwrites OnTriggerEnter
Trying to pick up and see paper - pop up GUI window to examine objects when clicked