void Start() { if (instance != null && instance != this) { Destroy(gameObject); } instance = this; DontDestroyOnLoad(gameObject); textTrans = transform.GetChild(0); gameObject.SetActive(false); }
void Start() { if (instance != null && instance != this) { Destroy(gameObject); } instance = this; textTrans = transform.GetChild(0); gameObject.SetActive(false); textRectTrans = textTrans.GetComponent <RectTransform>(); }