//Awake is always called before any Start functions void Awake() { //Check if instance already exists if (instance == null) instance = this; //If instance already exists and it's not this: else if (instance != this) Destroy(gameObject); DontDestroyOnLoad(gameObject); }
//Awake is always called before any Start functions void Awake() { //Check if instance already exists if (instance == null) { instance = this; } //If instance already exists and it's not this: else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
public void Awake() { countScript = GameObject.Find("CountObject").GetComponent<CountPoints>(); audioSource = GameObject.Find("Audio Source"); panelAnswer = GameObject.Find("PanelReponse"); panelLoading = GameObject.Find("PanelLoading"); //reponseText = GameObject.Find("Reponse"); imageSon = GameObject.Find("ImageSon"); votreReponse = GameObject.Find("VotreReponse"); buttonSuivant = GameObject.Find("Suivante"); check = GameObject.Find("Check"); uncheck = GameObject.Find ("Uncheck"); check.SetActive(false); uncheck.SetActive(false); panelAnswer.SetActive(false); panelLoading.SetActive(false); }
public void Awake() { countScript = GameObject.Find("CountObject").GetComponent <CountPoints>(); audioSource = GameObject.Find("Audio Source"); panelAnswer = GameObject.Find("PanelReponse"); panelLoading = GameObject.Find("PanelLoading"); //reponseText = GameObject.Find("Reponse"); imageSon = GameObject.Find("ImageSon"); votreReponse = GameObject.Find("VotreReponse"); buttonSuivant = GameObject.Find("Suivante"); check = GameObject.Find("Check"); uncheck = GameObject.Find("Uncheck"); check.SetActive(false); uncheck.SetActive(false); panelAnswer.SetActive(false); panelLoading.SetActive(false); }
public void Awake() { countScript = GameObject.Find("CountObject").GetComponent<CountPoints>(); }
public void Awake() { countScript = GameObject.Find("CountObject").GetComponent <CountPoints>(); }