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

来源:互联网 发布:mac win10 wifi驱动 编辑:程序博客网 时间:2024/06/07 04:54

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


0 0
原创粉丝点击