- Home /
MessageDisplayer Calling Problem C#
Hello I Have tried to use the MessageDisplayer found on Unify Here and i am having trouble calling it to create text. I have called the GUI Text Object Messagebox.
using UnityEngine;
using System.Collections;
public class NPC : MonoBehaviour {
void Start () {
GameObject Messagebox = GetComponent<MessageDisplayer> ();
}
void Update () {
MessageDisplayer.DisplayMessage("Hello");
}
}
It Comes up with 2 different errors.
Cannot implicitly convert type MessageDisplayer' to
UnityEngine.GameObject'
An object reference is required to access non-static member `MessageDisplayer.DisplayMessage(string)'
\ Forgive me as i am new and any help would be greatly appreciated. :)
Comment
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Drawing GUI Text using Javascript 2 Answers
How can I display text onscreen dynamically? 2 Answers
Limit on GUI Components? 0 Answers
Unity 4.3 problem 1 Answer