Beispiel #1
0
 /// <summary>
 /// Ensure this is no longer the registered instance.
 /// </summary>
 void OnDestroy()
 {
     if (_instance == this)
     {
         _instance = null;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Register as the facing manager instance. Handle <see cref="_addSelf"/>.
        /// </summary>
        void Start()
        {
            if (_instance == null)
            {
                _instance = this;
            }

            if (_addSelf)
            {
                Add(gameObject, _selfForward, _selfUp);
            }
        }