Target Resolution "Best Performance" override? (solved + code)

Hello,

On old ipads (Gen2, Gen3), I can’t hit my target 30fps in a 3D game without using the best performance option. I’m maxing the renderer according to the xcode GPU report, so I’ve hit a bandwidth limit of some sort (despite many improvements to the sizes of textures, which didn’t get me much and atlassing).

The issue I have is my menu scene.This screen has a title page and a “play butotn”, this screen has no FPS problem, but with the scaling (0.75 or 0.5) imposed by the “Best Quality” setting it looks horrible - especially on the non-retina ipad.

I would like to go to full res on this scene and back to scaled res (best performance) on for the actual 3D game play. Anyone know a technique? I’ve exercised my google muscle and found little except for this:

Thank you,
Seth

To be more specific. I want my menu screen to match my splash screen (in full “Best Quality” mode this works perfectly). The only difference between the menu and the splash screen is a “play” button is added after I async load the actual 3d game scene in the background.

So here is roughly something that works. You can set your iOS to app to best performance but still use the full resolution of the device for menu and cut scenes where you typically don’t not FPS issues.

I did notice that width is always the smaller number on iOS, which was interesting (internally always portrait?).

In my setup I fade the menu/cut scene in from black, and also fade out to black during the scene exit, so I do these resolution changes when the screen is still black so it doesn’t do anything funny visually.

int scaledWidth = -1;
int scaledHeight = -1;

void Awake() {


    if (SystemInfo.deviceType == DeviceType.Handheld) {


        int devWidth = Display.main.systemWidth;
        int devHeight = Display.main.systemHeight;

        Debug.Log ( "devwidth=" + devWidth + " devheight=" + devHeight );
        Debug.Log ( "width=" + Screen.width + " height=" + Screen.height );

        // the scaled resolution, we want to remember this because
        // when we need to set it back for performance just as we swap scenes
        scaledWidth = Screen.width;
        scaledHeight = Screen.height;
         
        Screen.SetResolution ( devWidth, devHeight, true);

    }

}

void SwapScene() {

    // In my case I load this scene async, and after the user hits the play button
    // I fade to black, and once it's all black I switch it so nothing visually looks odd
    // on the screen

    if (scaledWidth != -1)
        Screen.SetResolution ( scaledWidth, scaledHeight, true);

    Application.LoadLevel ("some_fancy_scene");

}

Note: fixed typo should be == and not = in first condition.