- Home /
Question by
g8minhquan · Nov 25, 2014 at 08:40 AM ·
messagebox
Design Pattern: How to make a MessageBox
As the title say, I want to make something similar to a MessageBox or Alert box.
I'm already quite familiar with basic Unity stuffs and know how to make a MessageBox with Unity UI 4.6 or NGUI, so I'm not asking about how to use an Image as background or Text as message.
What I'm asking is that how can I make something like a static function or whatever that let me create the UI using 1 line of code like:
MessageBox msgBox = new MessageBox("Title", "Message");
or
Alert ("Well done");
from anywhere in the program. Thanks.
Comment