Hi,
I’m trying to make changes to a project defaultEngine.ini from a C++ function, however appear unable to do so.
Having followed guidance here (Feed Detail) , it may be that there is now a setting to lock config files from saving however even still I’ve not been able to see a change. For instance, the following code does not appear to make any change to my project defaultEngine.ini:
`FConfigFile* ConfigFile = GConfig->FindConfigFile(GEditorIni);
ConfigFile->bCanSaveAllSections = true;
// Path to the DefaultEngine.ini file
const FString IniFilePath = FPaths::ProjectConfigDir() / TEXT(“DefaultEngine.ini”);
if (GConfig)
{
GConfig->SetBool(TEXT(“/Script/Engine.RendererSettings”), TEXT(“r.MobileHDR”), false, GGameIni);
GConfig->Flush(false, GGameIni);
UE_LOG(LogGlauconOpenXR_EditorPluginSettings, Log, TEXT(“GConfig Valid”));
}
else
{
UE_LOG(LogGlauconOpenXR_EditorPluginSettings, Log, TEXT(“Invalid GConfig”));
}
UE_LOG(LogGlauconOpenXR_EditorPluginSettings, Log, TEXT(“Settings should have updated”));`
It may be that there are better ways to ensure that certain project settings can be changed - ideally, I want a plugin I’m developing to enforce certain project settings on a project if that plugin is present.
I’ve seen that it might be possible to link certain project setting requirements to .uassets however the documentation appears limited however I am struggling to find any way to link UAssetGuideline uassets to other Unreal assets.