# SetGameState(AndroidGameState)

> Sets the current AndroidGameState to be used for Automated game state hinting in Unity. Requires API level 33 (Android 13).

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Android](/engine/6000.6/script-reference/unityengine/android.md)
* **Assembly:** UnityEngine.AndroidJNIModule

```csharp
public static void SetGameState(AndroidGameState mode)
```

### Parameters

**** (\[AndroidGameState]\(/engine/6000.6/script-reference/unityengine/android/androidgamestate)): [AndroidGameState](/engine/6000.6/script-reference/unityengine/android/androidgamestate.md) value.

### Remarks

You can set the mode parameter based on the current game state. For example, you can use [AndroidGameState.None](/engine/6000.6/script-reference/unityengine/android/androidgamestate/none.md) for displaying the game menu and [AndroidGameState.GamePlayInterruptible](/engine/6000.6/script-reference/unityengine/android/androidgamestate/gameplayinterruptible.md) or [AndroidGameState.GamePlayUninterruptible](/engine/6000.6/script-reference/unityengine/android/androidgamestate/gameplayuninterruptible.md) during the gameplay.

Once set, the mode remains unchanged until you call this method again. However, if the game is interrupted by a full-screen video or a full-screen ad, the mode automatically changes to [AndroidGameState.Content](/engine/6000.6/script-reference/unityengine/android/androidgamestate/content.md).

When target device does not support the required API level, no action is taken.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Android;

public class MainMenu : MonoBehaviour
{
    void Start()
    {
        AndroidGame.Automatic.SetGameState(AndroidGameState.None);
    }
}
```
