Search Unity

RenderOverlays spikes and stays up?

Discussion in 'Editor & General Support' started by jmansa, Mar 14, 2019.

  1. jmansa

    jmansa

    Joined:
    Apr 13, 2012
    Posts:
    75
    Hi, I am building an app for iOS, based entirely on UGUI, but am having some issues.

    I have added this to Start()
    I have set the QualitySettings.vSyncCount to 0.
    Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes");

    I have set my target to 60fps

    In Update() I have
    Code (CSharp):
    1. if(Application.targetFrameRate < 60){
    2.      Application.targetFrameRate = 60;
    3. }
    This works most of the time, but sometimes, not sure why, jumps and spikes to 33fps and stays there.
    I have AdMob banner ad in the bottom which seems to be the one triggering this, course if I just keep the app open until the banner changes it falls int the right fps again. Also, if I pauses the app and starts it again I can get it back to the right framerate.

    My question is:
    Is it possible to force the farmerate back given this issue. Is there a AdMob fix (if it is AdMob triggering this)?

    Really hoping for help on this issue and thanks in advance :)