public void TransitionOfLevel() { //Congratulate the player for completing the level TextInstructionsString = "¡Lo lograste, haz pasado el nivel " + LevelNumber + "! ¡Gracias!"; //Assigns the string to the gameobject. TextInstructionsGameObject.GetComponent <Text>().text = TextInstructionsString; LevelEndPanel.SetActive(true); }
// Start is called before the first frame update void Start() { //LevelEndPanel = this.gameObject; CompletedGamePanel.SetActive(false); LevelEndPanel.SetActive(false); //This copies the text does not reference it. TextInstructionsString = TextInstructionsGameObject.GetComponent <Text>().text; }