|
Hi, I have question about this: http://www.unifycommunity.com/wiki/index.php?title=MessageDisplayer
If I would like to use messageDisplayerObject.DisplayMessage("hello"), do I have to create an object of MessageDisplayer? If so how can I do that? Thank you very much.
(comments are locked)
|
|
You need to attach this script to a GUIText object. Then, you can make a call to nameOfYourGUITextObject.DisplayMessage in any script which has a reference to your GUIText object in order to display a message. What you mean by reference to my GUIText object?
Dec 31 '09 at 03:04 AM
niter412
A variable declared in some script which has your GUITextObject as a value.
Dec 31 '09 at 04:25 PM
Mortim
(comments are locked)
|

Or how can I make this static so I do not have to create an object every time when I want to use the DispalyMessage function? I added the static before the void but it is saying that UpdateDispaly() also needs to be static so I changed that to static as well and now it's saying: An object reference is required for the nonstatic field, method or property.
Thank you!