Update the GameActivity library
Change which version of the GameActivity library your application uses.
Read time 2 minutesLast updated 2 days ago
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.
By default, Unity uses a specific GameActivity library version for each Unity version. The instructions on this page apply only to updates within the same major version of the GameActivity library.
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:
- 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.
- Open the file.
build.gradle - Locate the dependency.
androidx.games:games-activity - Change the version number to a compatible version.
- 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.