Version: Unity 6.0 (6000.0)
Language : English
Modify GameActivity bridge code
Set the application entry point for your Android application

Update the GameActivity library

The GameActivity application entry point is implemented as a library separate from the Unity Editor, allowing you to update the library independently. This means when Google releases bug fixes that your project requires, you can acquire the fixes by updating the GameActivity library version.

Note: Unity doesn’t test all combinations of Unity version and GameActivity library version. If you update to a newer GameActivity library version, test your application thoroughly. For more information about the recommended GameActivity library version per Unity version, refer to Unity and GameActivity version compatibility.

Update the library version

To update the GameActivity library version, follow these steps:

  1. Refer to GameActivity requirements and compatibility to identify the GameActivity version compatible with your Unity version. Only proceed if you have a critical requirement that the recommended version doesn’t meet.
  2. Open the build.gradle file.
  3. Locate the androidx.games:games-activity dependency.
  4. Change the version number to a compatible version.
  5. Save the file.

Rebuild and test your application to verify the new version integrates correctly.

For information on how to modify Gradle project files, refer to Modify Gradle project files.

Note: Make sure that the other AndroidX dependencies support the GameActivity version that you want to use. If they don’t you must update them too. For more information, refer to Declaring dependencies.

Additional resources

Modify GameActivity bridge code
Set the application entry point for your Android application