Esempio n. 1
0
    void Awake()
    {
        //1. 拿到引用,绑定事件
        contentText = transform.Find("Image/Text").GetComponent <Text>();
        instance    = this;

        Destroy(gameObject, 5f);
    }
Esempio n. 2
0
 void Awake()
 {
     _instance = this;
     txt       = transform.Find("Text").GetComponent <Text> ();
 }