I want to set the rendering configuration in the cpp of the plugin. After opening the project, the log shows that it has been set, but after closing the project, the Default. ini file has not changed, and the settings have not been applied after restarting. I don’t know how to handle this…
code:(Call in plugin‘s StartupModule)
(ps. The Tolog method is just a wrapper for UE_Log)
void FToShaderModule::ApplyEngineConfigs()
{
if (!GConfig)
{
tolog("GConfig error");
return;
}
FString RenderSection = "/Script/Engine.RendererSettings";
int bTessellation = 0;
FString K_Tessellation = " r.Nanite.Tessellation";
GConfig->GetInt(*RenderSection, *K_Tessellation, bTessellation, GEngineIni);
tolog("r.Nanite.Tessellation = ", bTessellation);
if (bTessellation == 0)
{
GConfig->SetInt(*RenderSection, *K_Tessellation, 1, GEngineIni);
GConfig->Flush(false, GEngineIni);
}
GConfig->GetInt(*RenderSection, *K_Tessellation, bTessellation, GEngineIni);
tolog("r.Nanite.Tessellation = ", bTessellation);
}
log :
If anyone could help me, I would really appreciate it!!! TAT