Since at least Unreal 5.5.4 I noticed that emitted PostEditChangeProperty and PostEditChangeChainProperty events calls have a change type set to “Unspecified” when the user edited property is contained in a UObject.
Some of our implementations relied on this, and this is how I noticed this change in behavior.
Thanks in advance if you have some suggestion for getting around this specific issue.
UCLASS()
class UMyObjet : public UObject
{
GENERATED_BODY()
// A simple value to test editing its value in the UI
UPROPERTY(EditAnywhere, Category = "Test")
int Value = 0;
};
UCLASS()
class AMyActor : public AActor
{
GENERATED_BODY()
public:
// An helper button to initialize our test Object
UFUNCTION(CallInEditor, Category = “Test”)
void CreateObject()
{
Object = NewObject(this);
}
// The property we want to edit
UPROPERTY(EditAnywhere, Instanced, Category = "Test", meta = (ShowInnerProperties))
TObjectPtr<UObject> Object = nullptr;
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override
{
// Here PropertyChangedEvent.ChangeType will be equal to 1 (i.e. EPropertyChangeType::Unspecified)
// regardless of the change made to Object->Value in the panel.
Super::PostEditChangeProperty(PropertyChangedEvent);
}
virtual void PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent) override
{
// Same issue here
Super::PostEditChangeChainProperty(PropertyChangedEvent);
}
This should be fixed in CL# 38718909 if you want to backport it, you should just need the change to PropertyNode.cpp that removes the following:
// Parent object node property. Reset property and leave the event type as unspecified since we dont pass in the exact leaf property. ChangedEvent.ChangeType = EPropertyChangeType::Unspecified;Let me know if that doesn’t work for you and we’ll investigate.