void OnDisable() { if (activeLose) { LoseBut.SetActive(true); } if (activePlayText) { PlayText.SetActive(true); } detectClicks.GetComponent <BoxCollider> ().enabled = true; AllCubes.SetActive(false); }
void OnEnable() { if (PlayText.activeSelf) { activePlayText = true; PlayText.SetActive(false); } detectClicks.GetComponent <BoxCollider> ().enabled = false; AllCubes.SetActive(true); if (LoseBut.activeSelf) { activeLose = true; LoseBut.SetActive(false); } }