Simple project on Android: Builds correctly, runs on device, but it is very buggy.

Hi everybody,

TL,DR: Trying to build official Unity Tutorial project to Android. Project runs fine on computer. Runs fine on Unity Remote. When building to Android device, it runs, but is very buggy. This video provides more details: - YouTube

I’m dipping my toe into Android deployment for Unity. Having no prior experience, I figured the best place to start was with an official Unity tutorial project. I grabbed the 2D Roguelike Tutorial, which is excellent, and worked through it from start to finish (just to be sure, I copied their scripts directly to my project to make sure everything is an exact match). The project runs just fine in the editor. So far, so good.

I then followed the steps to install the required SDKs and point Unity to their respective folders. All is well.

Then I installed Unity Remote on my device, which is an ASUS Memo Pad running Android 4.2.2 Jelly Bean. I can run the project in Unity Remote and it shows up on my device, and touch inputs work fine.

The problem comes when I try to build the project and run it on the device. It builds fine. It runs. But there are weird bugs that don’t seem to make any sense. Tiles appear in odd locations, the level progression doesn’t work right, and the character is killed automatically on level 4. None of these problems happen when I run the project in the editor or when I run on my device using Unity Remote as an input device - because in both of those cases, the compiled code is running on the computer, not the device. The problems only manifest themselves when I actually build to the target device.

The bugs only appear when the project is compiled and run on the Android device itself. What might I be missing here?

(If you need to take a look at the scripts to figure this out, just check out the official project on the Unity website. All of the scripts are there. I copied them line-by-line.)

In order to make this easier to debug, I made a video (link at the top of this post) showing my setup. Any help is welcome and appreciated. Thanks very much!

Information that might be helpful
I have installed the following SDKs and modules:

  • Java Development Kit jdk1.8.0_65
  • Android SDK Tools 24.4.1
  • Android SDK Platform-tools 23.1
  • Android SDK Build-tools 23.0.2
  • Android 6.0 (API23)
  • Android 4.2.2 (API 17)
  • Android Support Library 23.1.1
  • Google USB Driver 11

This issue has been confirmed by the Unity staff and is being investigated. This thread contains updates: