The best way to set device-specific configurations is to create a custom Config/DefaultDeviceProfiles.ini
inside your project. You can set many properties in a device profile, such as a texture pool size; it is the recommended way of handling scalability on different mobile devices or in scalability settings buckets on PC/Mac.
[iPhone5 DeviceProfile]
DeviceType=IOS
BaseProfileName=IOS
MeshLODSettings=
TextureLODSettings=
+CVars=r.RenderTargetSwitchWorkaround=1
[iPhone5S DeviceProfile]
DeviceType=IOS
BaseProfileName=IOS
MeshLODSettings=
TextureLODSettings=
+CVars=r.MobileContentScaleFactor=2
+CVars=r.BloomQuality=1
+CVars=r.DepthOfFieldQuality=1
+CVars=r.LightShaftQuality=1
For more on setting up configuration files, see the main Configuration Files documentation.
iOS
Device profiles can be used to set your game's resolution for iOS devices. The r.MobileContentScaleFactor
property is relative to the 'nominal iOS resolution' for a device. For example, a Retina iPad has actual resolution 2048x1536, but nominal resolution 1024x768, so you would use 2.0 to get native resolution there. You can also use fractional values like 1.5 if you want more resolution but not the full performance hit from running at native resolution.
[iPad3 DeviceProfile]
+CVars=r.MobileContentScaleFactor=1
[iPad4 DeviceProfile]
+CVars=r.MobileContentScaleFactor=2
[iPadAir DeviceProfile]
+CVars=r.MobileContentScaleFactor=2
The iOS device profiles can be seen in BaseDeviceProfiles
in Engine\Config
. These categories are set through a plugin system, with the default plugin being iOSDeviceProfileSelector. The iOS device categories are simply the name of the device.
Android
Android has hierarchical device profile categories (see BaseDeviceProfiles.ini
in Engine\Config
for examples). These categories are set through a plugin system, with the default plugin being AndroidDeviceProfileSelector.