Default value from config file in GameFeatures plugin

hello everyone. I would like to set a variable default value using a config file inside a Plugin I created under the GameFeatures folder. I created in the Config folder a file called DefaultValuesConfig.ini where I would like to store the default value. The class I created inherits from UGameInstanceSubsystem and is called ConfigurationManager, the value I would like to set is Defaults. So in the ConfigurationManager.h I did

UCLASS(Config=DefaultValuesConfig)
class MYPLUGINRUNTIME_API UConfigurationManager: public UGameInstanceSubsystem
{
...

UPROPERTY(Config)
TSoftObjectPtr<UDA_Default> Defaults;  // UDA_Default is a data asset class
}

and in the ConfigurationManager.cpp

UConfigurationManager::UConfigurationManager()
{
    LoadConfig();
}

In the DefaultValuesConfig.ini file

[/Script/MyPluginRuntime.ConfigurationManager]
Defaults=GameFeatures/MyPlugin/Configuration/Default.Default

Am I missing something? What I see is that the value is not assigned to the config file. Rider is not showing me the preview of the assigned value, which it does for correctly set config files, and also at runtime the problem persists. One thing I should mention is that the ConfigurationManager.h is in a subfolder under the Public part of the plugin called Configuration. I also tried using [/Script/MyPluginRuntime.Configuration.ConfigurationManager] but it didn’t make a difference. Can you please help me? thanks!

3 Likes