/// <summary> /// Unity OnDestroy callback. /// </summary> protected virtual void OnDestroy() { if (!Application.isPlaying || TouchManager.Instance == null) { return; } StopAllCoroutines(); manager.RemoveLayer(this); }
/// <summary> /// Unity OnDestroy callback. /// </summary> protected virtual void OnDestroy() { if (!Application.isPlaying) { return; } StopAllCoroutines(); if (layerManager != null) { layerManager.RemoveLayer(this); } }