What would be the best way to async GameManager with player controller?

Hey everyone!!, As I said in question title, I want to know a way to check if the GameManager.CurrentState is inGame so the player can move.

The only solution i have is putting a enum variable called “gameState” with some default values like “{inGame, inMenu, inPause, inCinematic etc…}” and then putting a if statement calling that GameManager class in the playerController.cs to check the currentState.

The problem comes when I’m in testing mode in a empty scene. I’m forced to create a GameManager object in that scene for testing purpouse because the playerController depends on that gameManager global Class.

Is there a way to make the player Controller dependent from the gameManager to check if the game is in pause, cinematic, inMenu etc… and also independent because I don’t want to be adding a gameManager in every scene I’m testing the playerController.

@Danilock What you can do is add this to your Gamemanger and it will persist even if you load different scenes. The downside is you have to start with same scene everytime.

    private void Awake()