Discussion General How do i open gameover screen by c# code?

Users who are viewing this thread

To open the game over screen in the early access version

I used this c# code and it worked

GameMenu.ActivateGameMenu("game_over_menu");

But now it doesn't seem to work and cause crashes...

How can I open the game over screen?
 
Last edited:
Since we've added the new statistics screen to the end game the game over menu is deprecated. You can open the new game over statistics screen like this.

GameOverState state = Game.Current.GameStateManager.CreateState<GameOverState>(GameOverState.GameOverReason.Retirement);
Game.Current.GameStateManager.PushState(state);
 
Since we've added the new statistics screen to the end game the game over menu is deprecated. You can open the new game over statistics screen like this.

GameOverState state = Game.Current.GameStateManager.CreateState<GameOverState>(GameOverState.GameOverReason.Retirement);
Game.Current.GameStateManager.PushState(state);
Thank you. confirm it work
 
Back
Top Bottom