UnityMol  0.9.6-875
UnityMol viewer / In developement
Developer Guide - Building for mobile devices

post-v0.9.5

umollogo

Mobile devices tested

Device Status Comments
Asus Nexus 7/Android 6
experimental
Builds fine, runs. GUI elements are too small. HyperBalls shader ok. Secondary structures work. Surfaces partly work.
Android TV/Android 5
experimental
Builds fine, runs slowly. HyperBalls shader ok. Secondary structures work. Surfaces partly work.
Ramos W32 tablet/Android 4
partial success
Builds fine, runs. HyperBalls shader not working (pink cubes)! Secondary structures work. Surfaces partly work.
Samsung Galaxy S6/S7/Note 5
planned
Should be close to the Nexus 7 observations. But will go further to assess Gear VR potential.
iPad iOS
planned
Generated builds for ipad and iphone with previous versions. They execute but at that time shaders were not OpenGL ES compatible

Making an Android build of UnityMol

One-time initial setup and first build

Follow the Unity3D documentation for Android SDK Setup from https://docs.unity3d.com/Manual/android-sdksetup.html.

  • Install and setup Android Studio (includes SDK).
  • Using Android 6.X (N) SDK version.

In Unity3D, do the following steps:

  • switch platform to Android
  • set a bundle identifier in the Player settings. I use de.smplinux.unitymol.
  • in the Player settings as well, force the rotation of the screen to landscape, otherwise UnityMol will be unusable
  • then build or build & run.
Note
The first time you build such an Android version of UnityMol, Unity3D will ask you for the path to the SDK. On my local install this is ~/Library/Android/sdk.

Build and Player settings are described in more detail here: https://docs.unity3d.com/Manual/class-PlayerSettingsAndroid.html

Developing, testing and debugging

To build and run you can either use build & run from Unity3D, or - if you generated the .apk package, install from the command line.

Command Meaning
~Library/Android/sdk/platform-tools/adb install umol.apk install a previously built package onto the connected device
~/Library/Android/sdk/tools/monitor a very useful graphical interface to the device; provides access to logs, the possibility to generate screen captures and much more
~Library/Android/sdk/platform-tools/adb devices list connected Android devices
.~Library/Android/sdk/platform-tools/adb logcat show the device log

Graphics and shaders can be a source of complication. See for instance the platform specific rendering section of the Unity documentation: https://docs.unity3d.com/Manual/SL-PlatformDifferences.html.