private void Start() { text = gameObject.GetComponent <TextMesh>(); script = transform.parent.GetComponent <ButtonCanvasScript>(); if (type == TypeButton.QUIT) { text.text = "Quit"; } else if (type == TypeButton.RESTART) { text.text = "Restart"; } else if (type == TypeButton.RESUME) { text.text = "Resume"; } }
public void Start() { playerUIScript = Instantiate (playerUI).GetComponent< ButtonCanvasScript>();//AnotherButtonCanvasScript>();//<ButtonCanvasScript> (); playerUIScript.gameObject.SetActive (false); playerUIScript.SetPlayer (this); }