MessageBox the Unity GUI implementation of .NET's MessageBox class. It supports most of the MessageBox.Show() (http://msdn.microsoft.com/en-us/library/dtkc6h4c.aspx) methods except the ones to do with IWin32Window and Help. However, it comes with selectable buttons and icons. It also supports all the DialogResults. The main difference between this and the .NET version is that this requires the use of callbacks for handling the DialogResults. .NET Version: Code (csharp): var result = MessageBox.Show("This is the text", "This is the Title", MessageBoxButtons.YesNo); if(result == DialogResult.Yes) { Console.Write("Yes"); } else { Console.Write("No"); } MessageBox Version: Code (csharp): void Start() { MessageBox.Show(HandleMessage,"This is the text", "This is the Title", MessageBoxButtons.YesNo); } void HandleMessage(DialogResult result) { if(result == DialogResult.Yes) { Console.Write("Yes"); } else { Console.Write("No"); } } In-game Version: 1.0 Unity Version: 3.4.1 Source Code: C# Asset Store Link: http://u3d.as/content/corrupted-smile-studio/message-box/2Eo Web Player Demo Price: $5 Regards, Garth
DialogResult is within the CorruptedSmileStudio.MessageBox namespace, so you can either use Code (csharp): CorruptedSmileStudio.MessageBox.DialogResult or add Code (csharp): using CorruptedSmileStudio.MessageBox; then use it as Code (csharp): void MessageBoxCallback(DialogResult result) { // code } Are you trying to access this from C# or UnityScript? Regards, Garth
Hey, i am using Unity3d. But how i get The CorruptedSmileStudio package to use CorruptedSmileStudio.MessageBox namespace ? I dont have buy it!