Search Unity

Lower framerate on iOS since Unity 5

Discussion in 'iOS and tvOS' started by crockysam, Mar 26, 2015.

  1. crockysam

    crockysam

    Joined:
    Mar 26, 2015
    Posts:
    7
    Hi,

    I upgraded to Unity 5, but when starting a new project and setting the Application.targetFrameRate to 60, the fps on an iOS build stays at 30fps.

    It is fixed when I change the background to a solid color.

    Here are some screenshots from my empty scene:

    An empty scene created by Unity5


    That same empty scene with a solid color:


    However, this only seems to work in an empty project. In my new project, which has around 8 game objects, the fps stays around 24fps.

    I'm going to rebuild my project in Unity 4 to see if I have the same issue there.

    I'm using https://www.assetstore.unity3d.com/en/#!/content/14656 to visualize the fps. The iOS device is an iPad 3th generation.
     
  2. Funny-Face

    Funny-Face

    Joined:
    Nov 6, 2013
    Posts:
    17
    Yeah, there are already a lot about this issue.
    New dynamic skybox has several thousands polygons and quite heavy shader.
    So due you have a weak device with high resolution - this scene is already fragment shader heavy.
     
    MrEsquire likes this.
  3. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    by default we use so-called "procedural" skybox - which is indeed very heavy. You can override skybox material (we sure provide simple-cubemap-skybox shader) in lighting window (or dragging material into scene background)
     
  4. crockysam

    crockysam

    Joined:
    Mar 26, 2015
    Posts:
    7
    Hi,

    I recreated my game in Unity 4 and I get a full 60 fps on iOS.
    However, whatever I try in Unity 5 (changing the background, skybox, ...), the framerate never goes past 30 fps.

    Are you sure there isn't a bug somewhere in Unity 5 that limits the framerate?

    This problem also exists on an iPad 4th generation. I'm gonna try it on some newer devices when I get my hands on one of them.
     
    MrEsquire likes this.
  5. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit a bugreport with your sample project.
    Thanks!
     
  6. JoeVoxel

    JoeVoxel

    Joined:
    Sep 28, 2012
    Posts:
    127
    Hello crockysam,

    is the problem you mentioned fixed ?

    At the same period (March / April) I had the same issue, and I have been forced to reinstall Unity 4 to have my project working normally. I would like to know if I can update to Unity 5 now without this problem of frame rate.
    Thanks.
     
  7. crockysam

    crockysam

    Joined:
    Mar 26, 2015
    Posts:
    7
    Some projects seem to run in full 60fps now. One other project of mine still runs at a mere 18fps :-(
     
  8. crockysam

    crockysam

    Joined:
    Mar 26, 2015
    Posts:
    7
    Update:
    I created a new camera on the project with the problems, chose a solid background and now I have an FPS of 60.
    So it's fixed! :)
     
  9. crockysam

    crockysam

    Joined:
    Mar 26, 2015
    Posts:
    7
    I spoke too soon. Changing the camera angle F***ed it up again. 30 fps again :-(
     
  10. crockysam

    crockysam

    Joined:
    Mar 26, 2015
    Posts:
    7
    Dear Unity developers, will you fixed this before discontinuing Unity 4.6 ??
     
    Moonjump and bluescrn like this.
  11. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please share your bugreport numbers.
    Thanks!
     
  12. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Just wanted to add that I've just managed to run my app on Unity 5 for the first time (5.2.1) and to my eye it's running slower that in 4.6.8. Will investigate with profiler when I get a chance.
     
    MrEsquire likes this.
  13. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I would not be surprised at all. im still on 4.6.8 as finishing of a major project, then plan was to do new projects in 5.2x etc but really the performance worries me..ios is usually very stable with android and other devices being slow.. Very intrested to see what you find out.. Thanks
     
  14. xman800

    xman800

    Joined:
    Feb 27, 2017
    Posts:
    25
    I thought I ran into this issue even with Unity 5.5, but it turned out that I had one of my mesh renderers set to use the standard shader instead of the mobile shader. The standard shader isn't meant for mobile and will absolutely crush the framerate.
     
    dmarfurt likes this.
  15. Lamphong

    Lamphong

    Joined:
    Jul 5, 2016
    Posts:
    1
    tại sao tôi đặt
    Application.targetFrameRate = 60;
    QualitySettings.vSyncCount = 0;
    when i test in xcode fps 30 ~ 32. why why
     
  16. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit a bugreport with repro project attached to it.
    Thanks
     
  17. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Same issue happening here. I have around 5 active cameras in the scene. When I disable one of the cameras (that is rendering nothing) I get 20+ FPS. (2017.2)