Trabla: Unity3D: build and run (debug mode) on android device ( os - windows).
Solving:
NOTE: Android Studio by default installs SDK
into C:\Users\<User>\AppData\Local\Android\sdk
Where <User> - your user in system.
1. Install Unity3D
https://unity3d.com/get-unity
2. Install JDK ( java development kit )
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3. Install Android Studio
https://developer.android.com/sdk/index.html
4. Run Android Studio -> select "Configure" -> "SDK Manager"
5. In Androdi SDK manager select all + click "Install"
6. After all packages installed in SDK manager - close SDK manager and Android Studio
7. Connect your Android Phone to PC
8. Goto your Android Phone settings -> "Developer options"
9. Enable "Developer options" + select checkbox "USB debugging"
10. Run Unity - create dummy project
11. In Unity Editor click "File" -> "Build and Run"
12. In "Build Settings" - select platform "Android" + add current scene + click "Player Settings"
13. In Player Settings - select "android"
1. Change Company name
2. Click "Other Settings"
3. Set "Bundle Identifier" - e.g. com.<YOURCOMPANY>.<PRODUCT>
example - com.epicgames.supermario
14. Click "Build And Run" in "Build Settings"
NOTE: Android Studio by default installs SDK
into C:\Users\<User>\AppData\Local\Android\sdk
Where <User> - your user in system.
ATTENTION: in real app set target frame rate - if not Unity will run your app in android with highest possible frame rate ( I tested with Sony Xperia Z - get 200 fps!!!! is ok when - 30 fps - 60 (3D games) )
//Put it into main game script
void Awake()
{
Application.targetFrameRate = 30;
}
No comments:
Post a Comment