I've placed all documentation for our current projects online.
Spawner
MessageBox
Localising
JukeBox - Pro
INISystem
GameAds
FeedMe
Console
UniPack is still being worked on but is approaching 1.0 release level.
Regards,
Garth
Showing posts with label MessageBox. Show all posts
Showing posts with label MessageBox. Show all posts
Wednesday, 5 September 2012
Monday, 6 February 2012
.NET Message Boxes in Unity
While browsing the answer.unity3d.com site I came across a question on how to make a message box in Unity, so I set about recreating as much of the message box functionality as possible in Unity's standard GUI system. Having just implemented a very similar system in order to display Debug messages to the screen it proved rather simple.
Without further ado I present to you MessageBox, a Unity MessageBox implementation of the .NET MessageBox. Complete with selectable buttons and icons. It uses Callbacks instead of the inline way that the .NET version does, however it is similar in every other way.
Supports almost every overloaded method of MessageBox.Show(), it does not support any of the IWin32Window or Help methods.
.NET Example:
Unity Example:
Version: 1.0
Unity Version: 3.4.1 Free
Price: $2
Asset Store Link: http://u3d.as/content/corrupted-smile-studio/message-box/2Eo
Web Player Demo.
Regards,
Garth
Without further ado I present to you MessageBox, a Unity MessageBox implementation of the .NET MessageBox. Complete with selectable buttons and icons. It uses Callbacks instead of the inline way that the .NET version does, however it is similar in every other way.
![]() |
| Runtime |
.NET Example:
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");
}
Unity Example:
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");
}
}
Which is very similar with the only change being the callback in the beginning (HandleMessage) which can be any method as long as it accepts a DialogResult parameter.Version: 1.0
Unity Version: 3.4.1 Free
Price: $2
Asset Store Link: http://u3d.as/content/corrupted-smile-studio/message-box/2Eo
Web Player Demo.
Regards,
Garth
Subscribe to:
Posts (Atom)
