Exemple #1
0
        void Start()
        {
            if (instance != null && instance != this)
            {
                Destroy(gameObject);
            }
            instance = this;
            DontDestroyOnLoad(gameObject);

            textTrans = transform.GetChild(0);
            gameObject.SetActive(false);
        }
Exemple #2
0
        void Start()
        {
            if (instance != null && instance != this)
            {
                Destroy(gameObject);
            }
            instance = this;

            textTrans = transform.GetChild(0);
            gameObject.SetActive(false);
            textRectTrans = textTrans.GetComponent <RectTransform>();
        }