Exemplo n.º 1
0
        void Start()
        {
            if (instance != null && instance != this)
            {
                Destroy(gameObject);
            }
            instance = this;
            DontDestroyOnLoad(gameObject);

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

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