- Home /
Which resolution is used when "Auto (Best Performance)" is selected?
In the studio I work for, we're developing a game for iPhone and iPad, and I'm seeing that the art team is using very large textures for the GUI. They say it's because they want the textures to look good on a retina iPad, but our player settings are configured to automatically choose a resolution (the "Auto (Best Performance)" setting).
Which resolution does Unity choose on a retina iPad when "Auto (Best Performance)" is selected? If it's less than 2048x1536, then I can go to the art team and ask them to resize our textures and gain some memory back.
Thanks.
Answer by whydoidoit · Apr 19, 2013 at 10:39 PM
It sets it to 75% of the actual screen resolution.
Thanks. Is this information available anywhere in the documentation?
This routine in AppController.mm - note $$anonymous$$e are different as I've modified it to support a lower resolution on iPhone4
static void
QueryTargetResolution(int* targetW, int* targetH)
{
int targetRes = UnityGetTargetResolution();
float res$$anonymous$$ult = 1.0f;
if(targetRes == kTargetResolutionAutoPerformance)
{
switch(UnityGetDeviceGeneration())
{
case deviceiPhone4: res$$anonymous$$ult = 0.5f; break;
case deviceiPad1Gen: res$$anonymous$$ult = 0.5f; break;
default: res$$anonymous$$ult = 0.75f;
}
}
if(targetRes == kTargetResolutionAutoQuality)
{
switch(UnityGetDeviceGeneration())
{
case deviceiPhone4: res$$anonymous$$ult = 0.8f; break;
case deviceiPad1Gen: res$$anonymous$$ult = 0.75f; break;
default: res$$anonymous$$ult = 1.0f;
}
}
switch( targetRes )
{
case kTargetResolution320p:
*targetW = 320;
*targetH = 480;
break;
case kTargetResolution640p:
*targetW = 640;
*targetH = 960;
break;
case kTargetResolution768p:
*targetW = 768;
*targetH = 1024;
break;
default:
*targetW = _mainDisplay->screenSize.width * res$$anonymous$$ult;
*targetH = _mainDisplay->screenSize.height * res$$anonymous$$ult;
break;
}
}
Your answer
Follow this Question
Related Questions
Dynamically choosing a high resolution texture at runtime on iOS devices 1 Answer
Rendering at 2048x1536 on the new Retina iPad? Most Stable version of XCode for Unity 4 beta? 0 Answers
what is best way to deal with text? 1 Answer
GameObjects appear different on device than on Unity3d scene mode 2 Answers
Can I improve the resolution quality of a photosphere applied as texture to a 3d sphere gameobject? 1 Answer