Hey guys.
I found an issue for screen resolution on android device.
I’m trying to make my game playing on ACTUAL resolution for any device. so I set +CVars=r.MobileContentScaleFactor=0 in DefaultDeviceProfile.ini as following.
[Android DeviceProfile]
+CVars=r.MobileContentScaleFactor=0
because, if r.MobileContentFactor is 0, it can be set actual resolution on android device as following code AndroidWIndow.cpp
// CSF is a multiplier to 1280x720
static IConsoleVariable* CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.MobileContentScaleFactor"));
float RequestedContentScaleFactor = CVar->GetFloat();
// 0 means to use native size
int32 Width, Height;
if (RequestedContentScaleFactor == 0.0f)
{
Width = MaxWidth;
Height = MaxHeight;
UE_LOG(LogAndroid, Log, TEXT("Setting Width=%d and Height=%d (requested scale = 0 = auto)"), Width, Height);
}
but, IT DIDN’T WORK.
so, I followed the log using logcat and found wrong sequence of initializing. (my device’s resolution is 1920x1200)
I think this is wrong sequence of initialization.
anyway I’ve solved this problem temporarily to set r.MobileContentScaleFactor value to DefaultEngine.ini.
[/Script/Engine.RendererSettings]
r.MobileContentScaleFactor=0
It works. but it is removed when I modify DefaultEngine.ini in Project Setting Window. so this is not comfortable way.
is there any solution except modifying DefaultEngine.ini?