private void RemoveScreenFromNavigationStack(ScreenController screenController) { var subjectScreenStackItem = _navigationStack.FirstOrDefault(screenStackItem => screenStackItem.ScreenController == screenController); if (subjectScreenStackItem == null) { Debug.LogWarningFormat("Trying to close a screen '{0}', but it doesn't exist in the navigation stack!", screenController.GetType().ToString()); return; } _navigationStack.Remove(subjectScreenStackItem); GameObject.Destroy(subjectScreenStackItem.ScreenController.gameObject); }