// Use this for initialization
 void Start()
 {
     GameObject nameField = GameObject.Find ("Name Field");
     GameObject firstInfo = GameObject.Find ("FirstInfo");
     GameObject secondInfo = GameObject.Find ("SecondInfo");
     GameObject thirdInfo = GameObject.Find ("ThirdInfo");
     GameObject camera = GameObject.Find ("Main Camera");
     this.displayName = nameField.GetComponent<Text>();
     this.firstInfoText = firstInfo.GetComponent<Text>();
     this.secondInfoText = secondInfo.GetComponent<Text>();
     this.thirdInfoText = thirdInfo.GetComponent<Text>();
     this.cameraScript = camera.GetComponent<StatisticScript>();
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        GameObject nameField  = GameObject.Find("Name Field");
        GameObject firstInfo  = GameObject.Find("FirstInfo");
        GameObject secondInfo = GameObject.Find("SecondInfo");
        GameObject thirdInfo  = GameObject.Find("ThirdInfo");
        GameObject camera     = GameObject.Find("Main Camera");

        this.displayName    = nameField.GetComponent <Text>();
        this.firstInfoText  = firstInfo.GetComponent <Text>();
        this.secondInfoText = secondInfo.GetComponent <Text>();
        this.thirdInfoText  = thirdInfo.GetComponent <Text>();
        this.cameraScript   = camera.GetComponent <StatisticScript>();
    }