Ejemplo n.º 1
0
        private void Awake()
        {
            if (_instance != null)
            {
                Debug.Log("A Portal Visualizer already exists in the scene!");

                if (Application.isPlaying)
                {
                    Destroy(this);
                }
                else
                {
                    DestroyImmediate(this);
                }
            }
            else
            {
                _initialized = true;
                _instance    = this;
            }
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            if (_instance != null)
            {
                Debug.Log("A Portal Visualizer already exists in the scene!");

                if (Application.isPlaying)
                {
                    Destroy(this);
                }
                else
                {
                    DestroyImmediate(this);
                }
            }
            else
            {
                _initialized = true;
                _instance = this;
            }
        }