I’m making a 2d game and have had some horrible and frustrating performance issues.
I have a simple scene with one realtime light, a background image on a plane (so I can bake lighting) with a Legacy/Diffuse shader (since the Mobile/Diffuse shader doesn’t work for realtime point lights).
[The red light is baked, the white light is realtime]
When I create a development build and run it on my Android device with Autoconnect Profiler, the profiler shows I have 60 fps but I can clearly see on my device that its running at 20-30 fps.
Here’s a sample frame
I’m fairly confident the profiler is simply wrong, since the FPS counter on the mobile game is 20-30 and I can literally see the slow movement of the frames.
How would this be fixed?
Additional notes:
Editor version: Unity 2021.1.0b1.1725
Picture of Player Settings (I’ve modified them a decent bit trying to get better performance)
I already set Application.targetFramerate to 60.
Is it just simply impossible to have a single realtime point light on mobile with 60fps?
Also note that I tried using URP and Point Light 2d before but I couldn’t bake 2d lighting for Sprites materials for some reason and the performance was equally bad, so I moved back to the Built-in Renderer.