Input.TouchCount buggy?

So, I’m having an issue with getting touch input. My (very simple) app works as follows :

  1. Display a skybox if touchCount > 0 (actually a PhotoSphere, using it for a Cardboard application)
  2. On user touches, swap between skyboxes (only 2 right now)

As simple as that. And it works, but it’s very buggy. Sometimes it will work perfectly, swapping between skyboxes with no issues. Sometimes it will work fine for a while, and then get “stuck” and not respond to touches anymore. Sometimes it will not work at all and stay stuck on the original skybox. I’m not sure if this is truly an issue with TouchCount, perhaps having two relatively large skyboxes loaded into memory is causing problems? But, then again, I’ve made a very similar app that changed skyboxes depending on where the user was looking and it did not have any issues.

There is nothing getting outputted to the logcat.

I don’t know if it’s useful, but I’ve tried building on Android 2 and up, and tried Android 4 and up. My phone is running 5.1.1

I would look in places other than Input.touchCount being buggy first - it’s really unlikely to have a Unity bug in such a commonly-used function, or more accurately, it’s far more likely that the problem lies elsewhere.

If you could post code showing how you’re using Input.touchCount, it’s possible the problem is there.

My first guess would be that the app itself is frozen during this time, possibly loading the images for the new skybox into memory - is there anything moving on the screen at the time this happens that would indicate the app is still rendering frames? If not, add something (maybe as simple as a rotating box in front of the camera) to diagnose that possibility.