Hello,
I’m trying to save some time updating my project’s version through an editor utility widget .
Currently I manually set the version through the editor’s project settings window and type whatever version I want in the Description → Project Version field.
I have written a function to increment the current version number but unfortunately it only writes the new data to a temp file located in Project\Saved\Config\Windows\Game.ini.
The updates are registered to DefaultGame.ini only after restarting the editor which is undesirable.
This is how I read and write the data at the moment:
If you are looking to edit the config files in the saved/config folder:
if (!GConfig) return false;
GConfig->SetString(
TEXT("/Script/EngineSettings.GameMapsSettings"), //section
TEXT("GameDefaultMap"), //Setting Name
TEXT("value string goes here"), //Value
GEngineIni //file to save
);
GConfig->Flush(false, GEngineIni); // Save the config file
Adding to this answer: If the setting you want to change is still unavailable you can edit it in the following way:
In the UE project/editor settings find the setting and note down the name/tool tip
In visual studio search the entire solution for the tool tip or name (tool tip is usually better) and step through until you find the setting you want. Note the type of the setting
Once you find the setting, find what class it is located under. Then search that on the UE4 C++ API for the class name
From there you will get the module and include files you need.
Put the module in the build.cs file as before and the include line in the include section of your blueprint function.cpp
then you can use GetMutableDefault<Class>->SettingName = variable/value to get or set
eg. I needed to change the maps to cook setting (UE4 Api)
In the module I put UnrealEd, in the include section I put #include “Settings/ProjectPackagingSettings.h”
In my blueprint function I added TArray mapstocook to my function inputs
and used