// Use this for initialization void Start() { textScript = GameObject.Find("Hud").GetComponent<TextAreaScript>(); PlayerPosition = GameObject.Find("Player").transform; _nextLevelNumber = int.Parse(transform.parent.name.Substring(transform.parent.name.Length-1)) + 1; if (GameObject.Find("Level" + (_nextLevelNumber))) if (GameObject.Find("Level" + (_nextLevelNumber)).transform.GetChild(0).Find("PlayerStartPoint").transform) NextLevelPosition = GameObject.Find("Level" + (_nextLevelNumber)).transform.GetChild(0).transform.FindChild("PlayerStartPoint").transform; }
// Use this for initialization void Start() { area = GameObject.Find("Hud").GetComponent<TextAreaScript>(); }