Example #1
0
 // Use this for initialization
 void Start()
 {
     GameObject gameControllerObject = GameObject.FindWithTag ("Text");
     if (gameControllerObject != null)
     {
         score_keeper = gameControllerObject.GetComponent <score_text>();
     }
     if (score_keeper == null)
     {
         Debug.Log ("Cannot find 'GameController' script");
     }
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag("Text");

        if (gameControllerObject != null)
        {
            score_keeper = gameControllerObject.GetComponent <score_text>();
        }
        if (score_keeper == null)
        {
            Debug.Log("Cannot find 'GameController' script");
        }
    }