i am losing my mind with configs right now and i dont even really know how to breakdown the issue simply but im gonna try, i add code later but it really won't help much imo cause i know what the issue is:
I have an optional module thats only loaded when a dependant plugin is available.
The Problem: My config settings is setup in the primary module, but it has a field of settings that relies on largely varied data so im using instanced structs for it.
UPROPERTY(standard config and syntax...)
Ex: TArray<FInstancedStruct> Data
//Actual structure is a TMap<SomeType,StructHere>
This works perfectly fine with any other struct from any other module EXCEPT my conditional module which add some new struct types.
These are unable to be found by the settings data when registered and thus always get set to none on reload. It does not matter if i load the module befoe or after registering my settings.
if (!LoadOptionalModule())
{...}
RegisterSettings();
Produces the same results regardless of load placement. Registration is the standard
{
USettingsType* PluginSettings = GetMutableDefault<USettingsType>();
SettingsModule->RegisterSettings("Project", "Plugins", "...NamesHere...",
LOCTEXT("RuntimeSettingsName", "...NamesHere..."),
LOCTEXT("RuntimeSettingsDescription", "...Description..."),
PluginSettings
);
}
I have tried the following:
- Creating a child class of the settings in the module and registering that instead. This works but they underlying data of the parent USettingsType remains unchanged. This is problematic as my internal code can only reference the parent type without adding dependencies
- Using a child class to store the data on engine shutdown and then passing it back to the parent. Problem: I cannot get the config data to save between engine launches.