- Home /
Popup window
I want to know how to create a popup window in a key event.
i have one sample application, there i have 3 scenes 1. Play/Quit options 2. Game 3. Game over
whenever user triggers "escape key", i just want to show one popup window with Pause Game Option
i have written code to display popup window:
function OnGUI () { if(Input.GetKey("escape")) { windowRect = GUILayout.Window (0, windowRect, DoMyWindow, "My Window"); } } function DoMyWindow (windowID : int) { if (GUILayout.Button ("Pause Game")) { .... }
}
please help me in this regard. thx.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075512im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Destroy Object then pop-up other small window question. 1 Answer
How can I get a popup window to follow the cursor? 0 Answers
Popup opened by event. Android 0 Answers
problem with a pop-up window 1 Answer
Android native popup window 4 Answers