Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Low FPS on iPad Mini, but fine on iPhone 6S

Discussion in 'iOS and tvOS' started by jdovermy, Jun 3, 2016.

  1. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
    Hey everyone,

    I recently loaded up my 2D game on an iPad Mini and noticed that the framerate is reeeallly bad, like 17-20fps. This is throughout the application, on the title screen that only has a few UI buttons and also during gameplay.

    I've been running the game on an iPhone 6S and it's been locked at 60fps (using application.targetframerate). I realize that the Mini is much older than the iPhone 6, but I didn't think it would perform this poorly.

    Are there any settings that may need checked/unchecked that would be causing this? I'm pretty new to the profiler, but I loaded it up and I can see that the overhead is super high (screenshot attached) and may be the cause of the issue.

    Thanks for the help!
    Jordan

    Screen Shot 2016-06-03 at 1.31.28 PM.png
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,021
    Is it a first gen mini? First gen mini is practically an iPad 2. That's 5 year old hardware. So yeah there should be a big difference.

    Also, Unity UI is a performance hog.
     
  3. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
    Yeah, first gen mini. Ok, I'll try disabling some UI and see if that helps any.

    Thanks for the reply.
     
  4. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
    Tried disabling all of the UI in the scene, no change in FPS, still sitting at 17-20. Seems kind of odd that I can't get the FPS above 20 even with an almost empty scene. I know the hardware is old, but I've tested other projects on this iPad and haven't had any real performance issues until now.

    Any other suggestions?
     
  5. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  6. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
  7. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
    Ok, wow, so after looking in Xcode more, I found out that the performance issues were being caused by a single shader. I have no idea why, not too experienced with creating shaders, but that just narrowed things down dramatically. Thanks for the suggestion, Mantas!

    I'm going to look into it, but if anyone wants to take a look at the shader and help me figure out why it kills performance I wouldn't be against it ;)
     
  8. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    have you manually set Application.targetFrameRate = 60;

    it has helped for me before...
     
  9. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
    Yep, it's set to 60. It'd definitely the shader I was using. I just don't think it was optimized for mobile.
     
  10. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Question is how many of the Shaders that come with Unity are optimized for mobile properly.
    Since Unity 5 update there is issues with shaders in peoples projects and do not think they realise.
    If you have a quick way of identifying shader performance issues, please share with us?
     
  11. jdovermy

    jdovermy

    Joined:
    Mar 26, 2015
    Posts:
    12
    Not really a quick way and I'm not using a built in Unity shader. The way I found out was, the script that uses the shader is attached to the Main Camera. I disabled everything in the scene except for the Camera to see what was going on, still had performance issues... So that's when I followed Mantas' idea and connected it to Xcode and checked the performance. The shader that was attached to the camera appeared as a Warning in Xcode, so I disabled it and everything ran perfectly after that.

    Not sure if this is the best way to go about it, but the shader did show up in Xcode so maybe that'll help identifying the problem faster in the future.