How to reload config files modified in the editor?

How to reload config files modified in the editor? Generally , these modifications seem to take effect after restarting the editor only. Is there a way don’t need to restart editor?

This worked quite a while ago (like 4.5 or so), but broke in some version after that. I got it working again with some minor engine fixes in 4.6, but since 4.7 the functionality seems to be completely gone and I can’t figure out how to restore it. Every question I saw so far was left unanswered (like this one). Hopefully someday we get this feature back. Having to wait multiple minutes for the editor to start again is unacceptable!

Thanks for your answer!

As a workaround (in UE4.9) I got config files to reload in-editor by calling GConfig->LoadFile() from a derived actor’s BeginPlay(). For example:

    void AnActorInTheSceneClass::BeginPlay()
    {
        for(auto const& e : *GConfig)
        {
            GConfig->LoadFile(e.Key);
        }

        Super::BeginPlay();
    }

Since I was interested only in a couple of files, I loaded them explicitly (eg GConfig->LoadFile(GGameIni)) instead of the loop above.

Thanks jppm! It’s a good news . But the version of our project is U4.82 still, And in that version , the hotreloading function of those config files seems can’t work.

This is brutal bug for iteration. Any chance there’s a fix coming soon?

+1

This bug seems to have returned in UE 5. If I change the DefaultInput.ini file I have to restart the entire UnrealEngine editor which takes quite a bit of time and is relatively inefficient :frowning: Does anyone know how to fix this regression?

2 Likes

Checkout FConfigCacheIni::InitializeConfigSystem() in ConfigCacheini.cpp

you should call FConfigCacheIni::LoadGlobalIniFile functions a second time with bforcereload=True for every ini file that you want to reload

1 Like

Is there a way to fresh the INI files via Python, or only via C++?

I’ve made an Editor Widget Utility that successfully makes changes to “EditorPerProjectUserSettings.ini”. However, those changes don’t take affect.

Is there a way to ‘force’ Unreal to reload “EditorPerProjectUserSettings.ini” via python?

1 Like

Just an update to this: the only way to update Editor Preferences is with C++. I have an upcoming plugin in the UE Marketplace that does this, coded by Alexandru Oprea. He’s a fantastic programmer - you can check out his work at https://outofthebox-plugins.com/