Fix a issue with being able to play in the stats menu popup

This commit is contained in:
2025-10-11 13:25:37 -07:00
parent 07b555bbc6
commit 2e93c6d131
2 changed files with 10 additions and 0 deletions

View File

@@ -681,6 +681,11 @@ public class CustomGamePlayer : MonoBehaviour
internal void TogglePause()
{
if (CustomGamePlayerPauseMenu.Instance != null && CustomGamePlayerPauseMenu.Instance.statsMenu.activeSelf)
{
CustomGamePlayerPauseMenu.Instance.statsMenuExitButton.onClick.Invoke();
return;
}
if (pausePanel.activeSelf)
{
DisablePause();

View File

@@ -696,6 +696,11 @@ public class GamePlayer : MonoBehaviour
internal void TogglePause()
{
if (GamePlayerPauseMenu.Instance != null && GamePlayerPauseMenu.Instance.statsMenu.activeSelf)
{
GamePlayerPauseMenu.Instance.statsMenuExitButton.onClick.Invoke();
return;
}
if (pausePanel.activeSelf)
{
DisablePause();