/// <summary> /// Ensure this is no longer the registered instance. /// </summary> void OnDestroy() { if (_instance == this) { _instance = null; } }
/// <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); } }