ue4的打包全屏设置和分辨率设置

ue4因为在编辑器中不能设置打包分辨率 所以在此记录一下

方便快速设置ue4导出的分辨率(这里说的是win平台的)

默认发布应该都是全屏效果


方法1

发布后修改,这个需要首先运行一下程序

然后看程序目录C:\Users\shenmifangke\Desktop\项目导出文件夹\WindowsNoEditor\项目名称\Saved\Config\WindowsNoEditor

这个文件夹中会有一个GameUserSettings.ini

然后可以修改成

[html]  view plain  copy
 print ? 在CODE上查看代码片 派生到我的代码片
  1. [/Script/Engine.GameUserSettings]  
  2. bUseVSync=False  
  3. ResolutionSizeX=500  
  4. ResolutionSizeY=500  
  5. LastUserConfirmedResolutionSizeX=500  
  6. LastUserConfirmedResolutionSizeY=500  
  7. WindowPosX=-1  
  8. WindowPosY=-1  
  9. bUseDesktopResolutionForFullscreen=False  
  10. FullscreenMode=2  
  11. LastConfirmedFullscreenMode=2  
  12. PreferredFullscreenMode=2  
  13. Version=5  
  14. AudioQualityLevel=0  
  15. FrameRateLimit=0.000000  
  16. DesiredScreenWidth=500  
  17. DesiredScreenHeight=500  
  18. LastRecommendedScreenWidth=0.000000  
  19. LastRecommendedScreenHeight=0.000000  

就可以发现分辨率变量,

简单说下,如果不想搞懂直接修改的话 就是直接把mode结尾的都设置成2

500的就是分辨率了,可以自己设置,不过超出电脑分辨率的它会自动忽视


方法2

导出前就修改好

C:\Users\shenmifangke\Documents\Unreal Projects\项目文件夹\Config
新建一个DefaultGameUserSettings.ini文件

里面填上上面的配置,发布以后就会自动成为上面配置的分辨率了



方法1中的false改成True,2变成0就是全屏。

老外的原话

The answer should lie in your DefaultGameUserSettings.ini file. Inside "your project"\Config create a DefaultGameUserSettings.ini file. Inside that file, put the code below. Be careful that there are no spaces in front of each line.


 
 
  1. [/Script/Engine.GameUserSettings]
  2. bUseVSync=False
  3. //ResolutionSizeX=1920
  4. //ResolutionSizeY=1080
  5. //LastUserConfirmedResolutionSizeX=1920
  6. //LastUserConfirmedResolutionSizeY=1080
  7. WindowPosX=-1
  8. WindowPosY=-1
  9. bUseDesktopResolutionForFullscreen=True
  10. FullscreenMode=0
  11. LastConfirmedFullscreenMode=0
  12. Version=5
  13.  

This should default to fullscreen, using the native desktop resolution.

Note, that the double slashes are comments, and you can also set a custom resolution by uncommenting those lines, and setting bUseDesktopResolutionForFullscreen=False.

There are multiple fullscreen modes:

0 sets the game to true fullscreen.

1 sets the game to windowed fullscreen.

2 sets the game to windowed mode.

Also, for some reason when launching a standalone game from the editor, it completely seems to ignore the resolution values and just sets the resolution to some default. The packaged game should still use the correct resolution however.


老外链接:https://answers.unrealengine.com/questions/206504/how-to-default-fullscreen-in-shipping-package.html


  • 5
    点赞
  • 44
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值