Hello,
By following the directions in the documentation, I’m trying to save a config file.
Editing manually DefaultGame.ini allowed me to add this setting:
[/Script/Haven.HavenBuildGun]
RotationStep=10
which works wonderfully.
But saving… it doesn’t work (wait, this isn’t the bug, but I think the bug prevents saving!)
My setup has this info:
UCLASS(Config="Game") // I tried this both with and without quotes
class HAVEN_API AHavenBuildGun : public AHavenWeapon
{
GENERATED_BODY()
AHavenBuildGun(const FObjectInitializer& ObjectInitializer);
protected:
UPROPERTY(Config)
uint8 RotationStep;
// A bunch of other stuff here
}
And in the primary fire function, for testing:
void AHavenBuildGun::HandlePrimaryFiring()
{
RotationStep = 1;
SaveConfig();
// More stuff here
}
So, my class setup defines that the files will be saved to Game.ini file.
When I set breakpoints, inside the SaveConfig() function, there’s this block of code:
const FString Filename
// if a filename was specified, always load from that file
= InFilename
? InFilename
: GetConfigFilename(this);
When inspecting the GetConfigFilename() function, it seems it always returns Engine, thus, causing the value of Filename to be
+ Filename L"E:/Zoc_Haven_Workspace/Haven/Saved/Config/Windows/Engine.ini" FString
I’m a bit tired, but as far as I could inspect it, this is how it goes. The Game.ini never gets saved, and the variable isn’t saved into Engine.ini.
Thank you in advance, hopefully this can be easily solved
Update (2015-07-23) as requested by Eric (I am holding my breath to avoid making a Pokemon joke! Sorry! :x )
Branch: Unreal Engine 4.8.2, as downloaded from Epic Games Launcher
Build Version: 4.8.2-2614606+++depot+UE4-Releases+4.8
I think that’s it. Please, tell me if you need any extra information