Esempio n. 1
0
 private void OnDestroy()
 {
     if (_current == this)
     {
         _current = null;
     }
 }
Esempio n. 2
0
        private void Awake()
        {
            if (_current != null)
            {
                Debug.LogErrorFormat(
                    "Only 1x {0} script may be active at a time. Delete the current {0} script before creating a new one. Aborting.",
                    typeof(ParallaxLayerController).FullName);
                return;
            }

            _current = this;
        }