EditConditionHides does not work together with CanEditChange

I’m trying to conditionally hide a property from the details panel based on what CanEditChange returns. In general it works well when using the EditCondition and EditConditionHides specifier. Am I doing something wrong?

The property is displayed as read-only right now, but not hidden.

.h:

UCLASS(DisplayName="Complete Quest Task")
class GREENHEAVEN_API UGH_DE_CompleteTask : public UGH_DE_QuestBase
{
...
	UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
	TSubclassOf<UQuestTask> QuestTask;

	UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, meta=(EditConditionHides))
	bool FillProgressToMax;
...
#if WITH_EDITOR
	virtual bool CanEditChange(const FProperty* InProperty) const override;
#endif
};

.cpp:

bool UGH_DE_CompleteTask::CanEditChange(const FProperty* InProperty) const
{
	bool bCanEditChange = Super::CanEditChange(InProperty);

	if (InProperty->GetFName() == GET_MEMBER_NAME_CHECKED(ThisClass, FillProgressToMax))
	{
		bCanEditChange = bCanEditChange && QuestTask && QuestTask->GetDefaultObject<UQuestTask>()->ProgressRequired > 0;
	}
	
	return bCanEditChange;
}
1 Like

I’m trying to do the same thing. Did you find a way?

No. I took a look at the sources and it seems that it is simply not supported. I guess you would need to write a details customization for that.