OK. I have a C++ Project using 4.6 source from GitHub. We are able to build it and run it on iOS and Android (Portrait). For internal testing I’m also packaging it as Windows 32/64 bit. The problem is I cannot set the resolution to 640x960 other than to force a command line r.SetRes which I don’t want to do for UI reasons.
Researching this item I’ve come across 2 posts with the same issue:
The first post insists to make sure you have the following settings in DefaultGameUserSettings.ini file that comes from your project/config (NOT Saved/…) directory. My project did not have the file so I created it and added it to the solution.
What is even more interesting is that ALL of the ini files in that directory have NOTHING in them. They are all 1k (blank). The 2nd post says to just manually edit the GameUserSettings.ini file in that directory but the problem is that whenever I run the EXE it clears them all out. I assume it is supposed to copy all .ini files from the CleanSourceConfigs to the WindowsNoEditor but it looks to be creating them every time with NOTHING in them. So I can’t even do what was suggested on the 2nd post.
I apologize for not getting to this post sooner. It appears that there may actually be two issues here:
The .ini files are being wiped clean every time the packaged game is run.
The default settings are not being applied.
I have been able to reproduce the first issue, and it certainly does not seem like this should be happening. I have entered a report to have this looked into (UE-8172). Depending on when the .ini files are being wiped clean, correcting this may also correct the 2nd issue. We may have to wait for a resolution to the first issue.
I read the developers note on this issue (UE-8172) but didn’t understand it.
Developer Notes:
This is by design. The
coalescedSourceConfig contains what is
gathered from that inis base, default
and platform ini files. Options from
the coalesced config will be used at
runtime unless the user has changes in
the Saved/*.ini which then ultimately
overrides this. Note, The
coalescedsourceconfig is generated on
each run.
Can someone explain this to me please? If these ini files are wiped clean after every run by design then where should they be set to control things like window size and resolution when package is run in standalone mode?
If you have settings that can be changed in a project during runtime, and want to store those values for the next time the project is run, you will want to save those values in the corresponding Saved/.ini files. Any values stored in the Saved/.ini files will take precedence over anything in the coalesced source config files that are generated each time the project runs.
but when I run the project in standalone mode, all these files seem to be wiped clean.
When you said the values should be stored in corresponding Saved/.ini files, would you be more specific on exactly what the paths are so that the values are not wiped clean every time the project runs please?
Sorry for the delay. It’s been a while since I worked with config files, so I wanted to make sure I familiarized myself with it again. Setting the resolution in a config file needs to be done before the project is packaged, then the setting will be included and used in the packaged project. What you would want to do is create an .ini file in < Project >\Config\Windows (you may need to create the windows folder) and name it WindowsGameUserSettings.ini. The settings that you specify in this file will be the ones used when you run the packaged .exe.
Alternatively, if you need to be able to quickly adjust the config settings in the packaged project for testing, you can turn off the setting to create a PAK file when packaging. This results in all of the project files being available in the packaged project, including the config file that I mentioned above.