since UE 5.8 defaultconfig objects display an empty tab in Project Settings if their corresponding config section exists in its config file.
After investigating i found that FSettingsEditorCustomization::CacheResetDefaultPropertyValues locally creates a TempDefaultObject to handle the “reset to default” button in Project settings editor.
That object is allocated with RF_ClassDefaultObject flag, replaces the previous COD and is MarkAsGarbage when leaving FSettingsEditorCustomization::CacheResetDefaultPropertyValues scope.
Removing RF_ClassDefaultObject seems to get the expected behavior
// Skip creating temp object for abstract classes but still proceed further
if (!SettingsClass->HasAnyClassFlags(CLASS_Abstract))
{
// If the section exists in the current config, then defaults have been overriden
const FConfigFile* ConfigFile = GConfig->Find(ConfigFilePath);
if (const FConfigSection* ConfigSection = ConfigFile ? ConfigFile->FindSection(SectionName) : nullptr)
{
// Allocate a new temporary object to access defaults
//@CYA EDIT comment out "RF_ClassDefaultObject"
TempDefaultObject = StaticAllocateObject(SettingsClass, GetTransientPackage(), NAME_None, /*RF_ClassDefaultObject |*/ RF_Transient);
//@CYA END
EObjectInitializerOptions InitOptions = EObjectInitializerOptions::None;
My fix is partly wrong as it crashes when a class with the “Within” keyword is instantiated by FSettingsEditorCustomization::CacheResetDefaultPropertyValues
i had to use RF_ArchetypeObject keyword to skip the “within” checks like this
TempDefaultObject = StaticAllocateObject(SettingsClass, GetTransientPackage(), NAME_None, RF_ArchetypeObject | RF_Transient);and replaced this test in UNavigationSystemV1 constructor
//if (HasAnyFlags(RF_ClassDefaultObject) == false)
if (!IsTemplate())
Hi Colas, does this repro with built in setting classes, if so which one? Alternatively, can you provide your class definition for what you refer as “Test Dev Settings” in your repro steps?
Colas is on vacation until August and is unable to answer directly but told me that “Test Dev Settings” can be replaced by any class inheriting from `UDeveloperSettings` with at least one property that can be edited in the project settings.
Hi, we have a fix ready for this issue. We’re aiming to land it with our UE 5.8.3 release. If you need the exact changelist, let me know and I’ll provide it here once it’s in Perforce & Github. Otherwise, when 5.8.3 is released, you can pull that branch and the issue should be resolved.
Hi Colas, I loaded your project in a source build that I compiled from our dev-release-5.8 branch and also from 5.8.1 that I downloaded from the Epic Games Launcher. In both cases, the settings panel showed correctly.
Since your project came with entries in the array, I also tried to remove them from the UI, restart the editor, readd them and restart the editor but couldn’t get the issue to reproduce.
I’ve attached a screenshot of what I’m seeing on my side.
Is there anything else you can think of that I might be missing?