Example #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;
            }
        }
Example #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;
            }
        }