Hi!
We have a settings class that writes its properties to an ini file.
I noticed today that all bool properties that are marked as InlineEditConditionToggle don’t actually cause any changes in the ini file when the are toggled.
Here’s an example:
`UCLASS(BlueprintType, Config = “PL_LoadingScreen”, DefaultConfig, AutoExpandCategories = “Loading Screen|Common”)
class PL_LOADINGSCREEN_API UPL_LoadingScreenSettings : public UPL_SettingsBase
{
GENERATED_BODY()
public:
/**
- If true, the loading screen plugin is active and will take over loading screen rendering
- If false, the plugin will play dead and not interfere with whatever other processing you perform
*/
UPROPERTY(EditAnywhere, BlueprintReadOnly, Config, Category = “Loading Screen”, Meta = (DisplayName = “Enable Loading Screens”))
bool bEnabled { true };
/** If true, enables showing the Pre Load Screen during engine startup */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Config, Category = “Loading Screen”, Meta = (InlineEditConditionToggle))
bool bEnablePreLoadScreen { true };
/** The Pre Load Screen is the early loading screen visible during initial engine startup */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Config, Category = “Loading Screen”, Meta = (EditCondition = “bEnablePreLoadScreen”))
FPL_PreLoadScreenAttributes PreLoadScreen { };`The first bool (bEnabled) performs as expected, and toggling it will change the corresponding value in the .ini file.
The second bool (bEnablePreLoadScreen) doesn’t cause any updates to the .ini file when toggled.
I also noticed that when you mark a bool as InlineEditConditionToggle, it vanishes from the property hierarchy. So in e.g. a class detail customization, you cannot retrieve a TSharedPtr<IPropertyHandle> to it, you instead get an invalid (nullptr) handle. Possibly related.
In any case, I’m pretty sure InlineEditConditionToggle should be purely a visual change, by saving an extra line in the UI, and not cause a functional change like this.
Ciao, Daniel!