private void OnNavigateToWindow(string windowId) { // You usually don't have to do this as the system takes care of everything // automatically, but since we're dealing with navigation and the Window layer // has a history stack, this way we can make sure we're not just adding // entries to the stack indefinitely uiFrame.CloseCurrentWindow(); switch (windowId) { case ScreenIds.PlayerWindow: uiFrame.OpenWindow(windowId, new PlayerWindowProperties(fakePlayerData.LevelProgress)); break; case ScreenIds.CameraProjectionWindow: transformToFollow.parent.gameObject.SetActive(true); uiFrame.OpenWindow(windowId, new CameraProjectionWindowProperties(cam, transformToFollow)); break; default: uiFrame.OpenWindow(windowId); break; } }