Using android remote, things work fine (of course, on the actual phone fps is not nearly as good as editor on pc)
However, I recently did an internal test from google play console and the app is getting less than 1fps, totally unplayable, yet it is seemingly running without any other issues. (ie everything is unbearably slow and choppy but sounds/movement/logic etc seems to work)
I cannot seem to get the profiler running either… I follow the instructions of doing a “Build and Run” with my phone on wifi network, Development build checked, and Autoconnect Profiler checked, but at the end of the build, it just doesn’t run, though logcat opens and the profiler window opens. Prior to doing the Build and Run, I can run the game on Android Remote through the editor… after I do this build and run, I can’t. I have to restart unity.
So A) What could possibly be slowing my app down this much on android vs the editor? It averages around 60fps when profiled on my 3 year old laptop, and no crazy GC going on, and the profiler is generally always the biggest consumer of CPU. I have shadows disabled, and I’m not generating any variables in any update loops. In fact, I hardly use update loops at all, and when I do, they are almost always FixedUpdate for physics interactions. I do use HDR, as well as a bloom for post processing, but thats really it, aside from a couple of shaders that do some UV scrolling. What are some obvious no-nos for Android performance optimization?
And B) How do I get the profiler working for Android? I can’t test any real changes until I can see whats going on there.
Using URP on a Blackberry KeyOne with Android 8.1. I have the appropriate API for that version (I think 27) in my SDK folder. The phone has close to the same amount of RAM as my lenovo.
EDIT: When you are using Unity Remote, does it automagically connect to profiler? I just noticed I got different (better) results after I ran profiler without the phone connected, so I’m wondering if I’ve been using the profiler on the phone this whole time, not knowing Unity Remote already connected to it. IF that is the case, I’m showing steady 60fps on profiler when running on Unity Remote, yet getting <1 fps on the actual apk being ran from phone and I have no way of knowing why because the profiler doesn’t reflect that