# UE5.4 Changes to DefaultGame.ini reverting after editor refresh or map change

**URL:** <https://forums.unrealengine.com/t/ue5-4-changes-to-defaultgame-ini-reverting-after-editor-refresh-or-map-change/2654116>\
**Category:** Editor Scripting\
**Tags:** unreal-engine, editor, question, CPP\
**Created:** [September 6, 2025, 12:58am UTC](https://forums.unrealengine.com/t/ue5-4-changes-to-defaultgame-ini-reverting-after-editor-refresh-or-map-change/2654116 "2025-09-06T00:58:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustJunuh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justjunuh/32/1191727_2.png) [@JustJunuh](https://forums.unrealengine.com/u/JustJunuh)\
**Post date:** [September 6, 2025, 12:58am UTC](https://forums.unrealengine.com/t/ue5-4-changes-to-defaultgame-ini-reverting-after-editor-refresh-or-map-change/2654116/1 "2025-09-06T00:58:03Z")

</div>

I have a Blueprint EditorUtilityWidget that can update some UDeveloperSettings. My problem is that the changes don’t stick between an editor reload or map change. I can get the changes to apply to the DefaultGame.ini file, as reported by my version control. However, upon a map change or editor restart, the changes in the DefaultGame.ini file will revert.

If, however, I change the same settings in DefaultGame.ini _but through the ProjectSettings window_, they will persist between a map change or editor restart.

Here is my custom UDeveloperSettings that I am mutating through the BEUW:

```cpp
UCLASS(Config=Game, DefaultConfig, meta = (DisplayName = "Map Validation Settings"))
class GTMAPVALIDATOREDITOR_API UMapValidationSettings : public UDeveloperSettings
{
    GENERATED_BODY()
    
public:
    UPROPERTY(EditAnywhere, Config, Category = "Map Validation", meta = (ToolTip = "Define an array of MapTypes here. A MapType defines what types of relevant validation tests it should receive."))
    TArray<FString> MapTypes;
    UPROPERTY(EditAnywhere, Config, Category = "Map Validation", meta = (ToolTip = "For GT Map Validation to discern what validation tests to use, each packaged map must be associated with a MapType. It's best to not edit these settings here but instead through Tools > GT Map Validation"))
    TMap<FString, uint8> FileToMapTypeAssociations;
};

```

And here is the save function that I’m calling to save the changes.

```cpp
// Settings are retrieved via 
// UMapValidationSettings* Settings = GetMutableDefault<UMapValidationSettings>();

void UMapValidatorWidgetBase::Save(UMapValidationSettings* Settings)
{
    // Save all config properties to DefaultGame.ini
    Settings->SaveConfig(CPF_Config, *Settings->GetDefaultConfigFilename());
    // Force config flush
    GConfig->Flush(false, *Settings->GetDefaultConfigFilename());
}

```

I’ve tried seemingly every combination, but I don’t know _where_ it’s retrieving the initial values to revert to and why it’s doing so.

---

<div class="post-metadata">

**Author:** ![JustJunuh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justjunuh/32/1191727_2.png) [@JustJunuh](https://forums.unrealengine.com/u/JustJunuh)\
**Post date:** [September 6, 2025, 1:41am UTC](https://forums.unrealengine.com/t/ue5-4-changes-to-defaultgame-ini-reverting-after-editor-refresh-or-map-change/2654116/2 "2025-09-06T01:41:34Z")

</div>

🤦‍♂️ Sorry guys. Looks like this issue was just bad execution order. The BEUW was writing to the map settings unintentionally during initialization. The code here works.

If you’re still having an issue, consider this thread: [5.4 Config not saving correctly](https://forums.unrealengine.com/t/5-4-config-not-saving-correctly/1860118)
