Unity 3D And Android Studio Integration

Introduction

 
This article demonstrates how to integrate Android studio with Unity 3D. There are two Android build process output types in Unity, the output package (APK), and the exported project. An APK is automatically deployed to your device if you select Build and Run. Alternatively, you can use the Android Debug Bridge (ADB) to deploy the APK manually after building.
 
Run code on your Android device, or in the Android emulator. For more in-depth information see the step-by-step instructions below.
 
Step 1
 
First, go to create a new unity 3D project; if you add any package click here. 
 
Unity
 
Step 2
 
Go to file >> Build Settings.
 
Unity
 
Choose the Android Platform. If you try to run your game from another platform you can follow the same procedure then click the build and run button.  If you get an error follow the given steps to solve this error. 
 
("http://download.unity3d.com/download_unity/57cc34175ccf/TargetSupportInstaller/UnitySetup-Android-Support-for-Editor-2018.1.6f1.exe").
 
Unity
 
Step 2
 
Next, go to Edit >> Performances. Select Performances, and the External Tools will appear here.
 
Unity
 
Next, go to select the Script editor platform. I will choose the Visual Studio enterprise 2017. MonoDevelop for unity is the same as for Visual Studio.
 
Unity
 
JDK
 
The Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), and other tools needed in Java development.
 
SDK
 
The Android SDK (software development kit) is a set of development tools used to develop applications for the Android platform. I have already used this SDK and JDK. If you know this platform we can download and install the SDK and JDK. 
 
Unity
 
Unity
 
Step 3 
 
After this process is completed, build, and run again. If you faced an error, Bundle Identifier has not been set up correctly.
 
Please set the Bundle Identifier in the Player Settings. The value must follow the convention 'com.YourCompanyName.YourProductName' and can contain alphanumeric characters and underscore. Each segment must not start with a numeric character or underscore.
 
Unity
 
Next, go to Edit >> Player Settings >> Player, Select the player. The inspector box will appear, change the following name format and select the minimum API level.
 
Unity
 
Unity
 
Step 4
 
Next, go to Fill >> Build and Run. Select the build and run, the location box will appear, and  just place the app name with (.apk) format.
 
Unity
 
Run the application in your desired emulator or Android device following this command box, shown here.
 
(i)
 
Unity
 
(ii) 
 
Unity
 
Connect your Android device or emulator.
 
Unity
 
 
(iii) 
 
Unity
 
(iv) 
 
Unity
 

Summary

 
I hope you understood how to integrate Android with unity 3D studio.


Similar Articles