Hi everyone! Greetings from Lisbon!
After some research i found this thread: http://answers.unity3d.com/questions/12034/gui-message-box-handling talking about MessageBoxes where I posted this question (noob!..sory!):
is there any way to have something like this working on a webplayer?
if (UnityEditor.EditorUtility.DisplayDialog(title, body, "Yes", "No"))
print ("Yes");
else
print ("No");
I mean: is there any easy way to code a modal MessageBox without having to draw GUI.Box, GUI.TextArea and GUI.Buttons and use a boolean to let you know the dialog is still open?
Thank you all
2 Answers
2
Hi Clem, thanks for your answer!
Yes I can use it!
In fact I use it to call a jquery modal dialog from the webpage (here is the first experience I made with it.. but I wanted a more practical system where I could pause the game and interrupt a script execution, catch Yes/No answers, and then resume it automatically continuing from the interruption point or jump to some other method according to the dialog response, as the `EditorUtility.DisplayDialog` can! It's just that `Application.ExternalCall` and `GetUnity().SendMessage` are too limited (i think!.. At least I don't see how they could do this)!
Were you thinking about suggesting this? Do you think it can "do the trick"? How?
Edit: the link might be off for the weekend so try it here
Good to see you're getting some constructive help but, just as a note, try to post comments as comments and refrain from adding answers to comment on someone's response. Good luck with your question!
– Chris-DI know nothing about http://answers.unity3d.com, this was in fact my first question.. thanks for the tip, but why do you say that?
– anon62297582Adding answers to comment on someone's response make it difficult to follow answers to your initial question. See answers.unity3d.com/faq. Regarding you question it looks like the easiest way to achieve what you want is to do what is described in the thread you found initially.
– anon74431264Clem, in my question i said specifically: "without having to draw GUI.Box, GUI.TextArea and GUI.Buttons and use a boolean (...)"... well, tnks anyway
– anon62297582