View on GitHub

blog

Here are the labs from my blog.

How to Unity3D – Configure Project for Android and Run it on Mobile Device

alt text

In this tutorial, you start from scratch. You will install Unity3D, Android SDK, then configure a project for Android, and run it on a mobile device.

##

Steps

1. Choose Your Mobile Plateforme

Targeting a technology is always the same. Because it change over time, it’s safer to choose the “largest lesser” version (and not the latest) at your product launch to allow you to reach most devices .

Examples:

https://en.wikipedia.org/wiki/Android_version_history https://en.wikipedia.org/wiki/Android_version_history

alt text

alt text

2. Install Unity3D And Android Plugin (Windows)

Unity3D and his Android package is needed.

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

3. Install AndroidWorks (Windows)

You need to install Android SDK for Unity3D compatibility (API 23/Android6.0 for Unity3D 5.6) and for your target devices (API 19/Android 4.4.2)

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

4. Install Android USB Driver (Windows)

Sometimes, to enable debug mode, you need to install a specific USB driver for your phone.

https://developer.android.com/studio/run/win-usb.html https://developer.android.com/studio/run/win-usb.html

alt text

5. Activate Dev Debug Mode (Android)

Settings > About Phone > Build number > Tap it 7 times to become developer;

Settings > Developer Options > USB Debugging.

https://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android.htm https://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android.htm

alt text

alt text

6. Configure Project (Unity3d)

We will use the “Standard Assets Example Project”, but limit to only ONE scene because of the load of the entire project during deployment to the mobile device (one scene is 30sec, all scenes is 10min).

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

7. Build, Run and Play!

Project and device are ready.

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

Conclusion

AndroidWorks provide a simple way to install and manage android sdk installation.

Choosing Android version first is better, because latter it’s harder to do that latter in the project: you can run into Unity3D API changes, or bugs in your game, and you don’t want to do that just before your final release!

These example have been tested on multiple devices:

If you change your mind about the Android Version, just relaunch AndroidWorks.

alt text

Source

https://github.com/DamienFremont/blog/tree/master/20170601-unity3d-configure-project-for-android-and-run-it https://github.com/DamienFremont/blog/tree/master/20170601-unity3d-configure-project-for-android-and-run-it

References

https://en.wikipedia.org/wiki/Android_version_history https://en.wikipedia.org/wiki/Android_version_history

https://store.unity.com https://store.unity.com

https://docs.nvidia.com/gameworks/content/developertools/mobile/androidworks/androidworks_install.htm https://docs.nvidia.com/gameworks/content/developertools/mobile/androidworks/androidworks_install.htm

https://developer.android.com/studio/run/win-usb.html https://developer.android.com/studio/run/win-usb.html

https://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android.htm https://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android.htm

Origin

https://damienfremont.com/2017/06/01/how-to-unity3d-configure-project-for-android-and-run-it-on-mobile-device/