# SetGameState

> Calls setGameState() in the Android application to specify the loading status. Requires API level 33 (Android 13).

## Definition

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

## SetGameState(bool, AndroidGameState)

Calls [setGameState()](https://developer.android.com/reference/android/app/GameManager#setGameState\(android.app.GameState\)) in the Android application to specify the loading status. Requires API level 33 (Android 13).

```csharp
public static void SetGameState(bool isLoading, AndroidGameState gameState)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the game is in the loading state.**** (\[AndroidGameState]\(/engine/6000.6/script-reference/unityengine/android/androidgamestate)): [AndroidGameState](/engine/6000.6/script-reference/unityengine/android/androidgamestate.md) state.

### Remarks

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

## SetGameState(bool, AndroidGameState, int, int)

Calls [setGameState()](https://developer.android.com/reference/android/app/GameManager#setGameState\(android.app.GameState\)) in the Android application to specify the loading status. Requires API level 33 (Android 13).

```csharp
public static void SetGameState(bool isLoading, AndroidGameState gameState, int label, int quality)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether the game is in the loading state.**** (\[AndroidGameState]\(/engine/6000.6/script-reference/unityengine/android/androidgamestate)): [AndroidGameState](/engine/6000.6/script-reference/unityengine/android/androidgamestate.md) state.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Developer supplied custom value, e.g. for the current level.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Developer supplied custom value, e.g. for the current quality level.

### Remarks

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