Unityをはじめてみて最初にはまったことを忘れないようにメモしておきますが、
テキストを取得しようとして、
this.msgTxt.GetComponent<Text> ().text = "Ya-Ha-!";
みたいなコードを書いたら、
The type or namespace name `Text' could not be found. Are you missing `Unity Engine.UI' using derective?
というエラーがでて、
this.msgTxtが取得できてないのか?
とか、
GetComponentを使うんじゃないのか?
とか、
とか、いろいろ考えたんですが、原因はエラー文言を読んで字のごとく、
using UnityEngine.UI;
を忘れていただけでした。。。
エラー文言はちゃんと読もうと思いました。