I'm using Unity 2021.3.15f1 version, and trying to build an Android game which uses native Android functionality. The documentation on Create a custom activity for Android builds says: Then it says that the Activity file should be created on the Assets folder, inside the Unity project. But later it also says that you should "Create a new plug-in and add the Activity file to it." But how I do this? The docs say the plugin should be either an Android Library Project, an Android Archive (an already built AAR file), or a JAR. How can I add the activity file to an AAR/JAR file, if they are already built when inside the Unity project? The Android Library Project option doesn't tell me much about how to do, only to copy the android library project into the Assets folder and add an extension to its name (although it recommends to use the Android Archives instead). In this case, should I copy the entire Android Studio project into the Unity project's Assets folder? If not, which files should be copied? I also tried to create the activity inside the library on the Android Studio project and build the AAR file to import it at Unity later. However, it gives errors from not finding com.unity3d.player.UnityPlayerActivity (since it indeed only exists on Android Studio projects exported by Unity). So what exactly should I be doing to create the Android plugin and extend the UnityPlayerActivity? What file/folder goes where?