FPropertyNode::GetDiffersFromDefault always detects instanced inline objects as changed

If a blueprint class has an Instanced/EditInlineNew object property, that property will always be detected as changed by the property editor (i.e. it will show a “Revert” arrow on that property), even if its properties are identical.

This appears to be a regression from this change because FPropertyNode::GetDiffersFromDefault was changed to serialize the properties to strings and compare them, rather than using FProperty::Identical. String serialization just serializes the subobject as a path. Backing out that change in the GetDiffersFromDefault method makes the problem go away.

This blueprint should exhibit the issue. It’s worth noting the issue is far more intrusive if the property is nested in structs and/or arrays, since the changedness propagates all the way up through those properties.

UCLASS(EditInlineNew)
class FLORIDA_API UTestSubobject : public UObject
{
	GENERATED_BODY()

public:

	UPROPERTY(EditAnywhere)
	int PropertyA;
};

UCLASS(Const, Abstract, Blueprintable)
class FLORIDA_API UPropertyTestBlueprint : public UObject
{
	GENERATED_BODY()

public:

	UPROPERTY(EditAnywhere, Instanced)
	TObjectPtr<UTestSubobject> Subobject;
};

[Attachment Removed]

Steps to Reproduce

  1. Create a blueprint asset BP_Parent of type Property Test Blueprint
  2. Assign Test Subobject to the Subobject property
  3. Create a blueprint BP_Child that’s a child of BP_Parent
  4. On BP_Child, Property A is already marked as differing

[Attachment Removed]

Hi Brian,

Thank you for the detailed repro.

I tested it out on 5.6 and 5.7, and Property A doesn’t look to have the revert as shown in the following image

[Image Removed]However, I will note as you said in your post, that Subobject does have the revert even though it should be identical. Clicking revert doesn’t change anything and marks BP_Child as dirty requiring BP_Child to be saved.

Is this the behavior that you’re observing? (I mainly want to clarify since you mentioned it was Property A being marked.)

If so I can go ahead and make a bug report with your suggestion of where the regression came from.

Thank you!

Regards

[Attachment Removed]

You’re right, I named the wrong property there. “Subobject” and anything that contains it (like a struct or an array) will always be detected as changed, but any properties under Subobject will be correctly marked.

[Attachment Removed]

Thank you for the clarification!

I created a bug report for this issue that can be tracked here if/when it’s approved for public visibility: https://issues.unrealengine.com/issue/UE-358470. There is no ETA as priorities for bugs and features can shift at any time.

We don’t provide updates on EPS, but progress can be followed on that public issue tracker page. I’m closing this case, but feel free to respond here if you have follow-up questions.

Regards

[Attachment Removed]