/// <summary> /// Unsubscribes this listener from DayController. /// </summary> private void OnDisable() { if (dayController != null) { dayController.Unsubscribe(this); } }
/// <summary> /// Unsubscribes this listener from DayController /// and stops all running coroutines. /// </summary> private void OnDisable() { if (dayController != null) { dayController.Unsubscribe(this); } this.StopAllCoroutines(); }