The UnityPlayerActivity of a Unity Android application is responsible for basic interactions between the Android operating system and the application. You can use plug-insA set of code created outside of Unity that creates functionality in Unity. There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed .NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). More info
See in Glossary to create your own Activity that extends and overrides Unity’s default UnityPlayerActivity.
Notes:
UnityPlayerGameActivity class.UnityPlayerActivity and UnityPlayerGameActivity use the UnityPlayerForActivityOrService and UnityPlayerForGameActivity bridge classes respectively. Unity splits these bridge classes from the UnityPlayer Java class. To create a custom activity, extend UnityPlayerActivity or UnityPlayerGameActivity and not the bridge classes. If your activity code references the UnityPlayer class directly, rename it to the relevant bridge class to avoid compile errors.| Topic | Description |
|---|---|
| Create a custom activity | Extend the default Unity activity to control interactions between Unity and Android. |
| Specify Android Player command-line arguments | Specify startup command-line arguments to pass to Unity. |