I understand this question may be a bit trivial but we are slightly confused by this.
We have found that we have different platform configuration engine ini files in different folders:
- PROJECTROOT\Engine\Platforms\PlatformName\Config\BasePlatformNameEngine.ini <- this is totally correct and we dont have doubts about
- PROJECTROOT\GAMEROOT\Platforms\PlatformName\Config\PlatformNameEngine.ini
- PROJECTROOT\GAMEROOT\Config\PlatformName\PlatformNameEngine.ini
3 was generated by a plugin automatically but we would like to avoid having scattered project related engine ini files.
Are 2 and 3 legit and whatever is configured there will be read correctly with GConfig/GEngineIni ?
We would like to have just one so it will be good to know if one of those won’t be correctly merged.
Also, if for specific plugins we wanted to have specific values that can be read with GConfig/GEngineIni, is that possible to do? If that is the case, what would be the folder structure?
Thank you
[Attachment Removed]
Hi,
Both 2 and 3 are legit according to our documentation. You can find the loading order of the .ini file on this page: https://dev.epicgames.com/documentation/en\-us/unreal\-engine/configuration\-files\-in\-unreal\-engine. I copy pasted the interesting part below. I think this exists for legacy reasons, before we put efforts to split platform specific code cleanly. So you can use both, the .ini should be read. If you take Lyra, the trend is as following:
- Used for publicly available platforms: <PROJECT_DIRECTORY>/Config/<PLATFORM>/<PLATFORM><CATEGORY>.ini (I’d says this is the ‘legacy’ path)
- Used for restricted (NDA) platforms : <PROJECT_DIRECTORY>/Platforms/<PLATFORM>/Config/<PLATFORM><CATEGORY>.ini (I’d say this is the ‘today’s standard’ as we start to put public platform there too)
Category configuration files are loaded in the following order:
- Engine/Config/Base.ini
- Engine/Config/Base<CATEGORY>.ini
- Engine/Config/<PLATFORM>/Base<PLATFORM><CATEGORY>.ini
- Engine/Platforms/<PLATFORM>/Config/Base<PLATFORM><CATEGORY>.ini
- <PROJECT_DIRECTORY>/Config/Default<CATEGORY>.ini
- Engine/Config/<PLATFORM>/<PLATFORM><CATEGORY>.ini
- Engine/Platforms/<PLATFORM>/Config/<PLATFORM><CATEGORY>.ini
- <PROJECT_DIRECTORY>/Config/<PLATFORM>/<PLATFORM><CATEGORY>.ini
- <PROJECT_DIRECTORY>/Platforms/<PLATFORM>/Config/<PLATFORM><CATEGORY>.ini
- <LOCAL_APP_DATA>/Unreal Engine/Engine/Config/User<CATEGORY>.ini
- <MY_DOCUMENTS>/Unreal Engine/Engine/Config/User<CATEGORY>.ini
- <PROJECT_DIRECTORY>/Config/User<CATEGORY>.ini
Regards,
Patrick
[Attachment Removed]
For your last question: if for specific plugins we wanted to have specific values that can be read with GConfig/GEngineIni, is that possible to do? This thread from a colleague says it should work: [Content removed]
I assume the structure is the same than for the game (but try it to be sure). You can find a couple of example in the code base:
./Engine/Plugins/Experimental/DaySequence/Config/Engine.ini
./Engine/Plugins/MetaHuman/MetaHumanAnimator/Config/Engine.ini
./Engine/Plugins/MetaHuman/MetaHumanLiveLink/Config/Engine.ini
./Engine/Plugins/Online/OnlineServicesEOSGS/Config/Engine.ini
./Engine/Plugins/Online/OnlineServicesNull/Config/Engine.ini
./Engine/Plugins/Runtime/OpenXR/Config/Engine.ini
Regards,
Patrick
[Attachment Removed]
Thank you very much for your answers Patrick, really appreciated.
We will follow then <PROJECT_DIRECTORY>/Platforms/<PLATFORM>/Config/<PLATFORM><CATEGORY>.ini for our case to follow your late standard for engine.ini needed in our game module, and the mentioned plugin hierarchy for plugin case.
Thank you again,
Jose
[Attachment Removed]