• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by filixix · Apr 20, 2011 at 11:59 PM · messagebox

Is there an easy way to create MessageBoxes?

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

Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Clem · Apr 21, 2011 at 04:37 PM

Could you use Application.ExternalCall?

Comment
filixix

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by filixix · Apr 22, 2011 at 06:35 PM

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

Comment

People who like this

0 Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Chris D · Apr 22, 2011 at 07:26 PM 0
Share

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!

avatar image filixix · Apr 23, 2011 at 05:40 PM 0
Share

I know nothing about http://answers.unity3d.com, this was in fact my first question.. thanks for the tip, but why do you say that?

avatar image Clem · Apr 26, 2011 at 11:24 AM 0
Share

Adding 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.

avatar image filixix · Apr 26, 2011 at 10:47 PM 0
Share

Clem, in my question i said specifically: "without having to draw GUI.Box, GUI.TextArea and GUI.Buttons and use a boolean (...)"... well, tnks anyway

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Issues building an in-game MsgBox 3 Answers

Let Sound Clip wait for x seconds before sounding ? 1 Answer

Can I deactivate a messagebox without any scripting? 1 Answer

GUI Message Box 2 Answers

[En & Fr] Show a message on the screen - Faire apparaître un message sur l’écran 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges