How can I get the TArray index on PostEditChangeProperty override?

I have to get which element of an array property was modified, added or removed

UPROPERTY(EditAnywhere, Category = "Mine")
TArray<UStaticMesh*> Meshes;

And looks like this:

7067-capture.jpg

1 Like

Ok I probably found a way to get the TArray index of a modified/added item by overriding PostEditChangeChainProperty instead of the PostEditChangeProperty. But I still face to the problem of getting the index of a deleted element of the array.

void AShelfClass::PostEditChangeChainProperty(struct FPropertyChangedChainEvent& e)
{
    int32 index = e.GetArrayIndex(TEXT("Meshes"));
    UE_LOG(LogClass, Log, TEXT("PropertyChain index %d"), index);
    Super::PostEditChangeChainProperty(e);
}