Hi,
I cannot find a solution or a clear guideline for this problem.
I have a development machine with certain settings, example database name to connect to, and a production machine with different settings.
My SQLWrapper class is declared as such:
UCLASS(Config = ServerConfig)
class PSUNREAL_API USQLWrapper : public UObject
{
UPROPERTY(Config)
FString SQLDatabase;
…
}
In my development machine I have a file \Config\DefaultServerConfig.ini
with:
[/script/PSUnreal.SQLWrapper]
SQLUser=planeshift
SQLPass=planeshift
SQLHost=localhost
SQLPort=3306
SQLDatabase=planeshift_dev
and when I change the SQLDatabase in this file, it works as expected.
In production I want to change that value after installing my shipping build on the server.
I tried to add my overridden setting in these files:
PSUnreal/Config/DefaultServerConfig.ini
PSUnreal/Config/ServerConfig.ini
PSUnreal/Config/LinuxServer/DefaultServerConfig.ini
PSUnreal/Config/LinuxServer/ServerConfig.ini
but doesn’t work , it still picks the default from dev.
I unpackaged the files and I see it’s there:
LogPakFile: Display: “PSUnreal/Config/DefaultServerConfig.ini” offset: 31643405, size: 1315 bytes, sha1: 8A308BC0CAE4C665CB6C2506F12B1180F6C847A8, compression: None.
The only way for me to have it work is to add a file here:
PSUnreal/Saved/Config/LinuxServer/ServerConfig.ini
But the issue I have with this is that “Saved” is a temporary directory, and sometimes when the server crashes or restarts that file is removed, so at times our server on auto-restart doesnt find the file and crashes continuously with the wrong db setting (or other settings from dev machine).
I’m hopeful there is a simple way to just override a set of properties on server without having the file randomly deleted. Anyone has a solution?
Note: in the example I mention only one property, but we have 30+ properties set in that file, and I need them all, so passing on command line is not a solution to me.