UE4 Setting Device Profiles

1649 篇文章 11 订阅
1623 篇文章 22 订阅

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.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值