I have a TArray and a PreEditChange override that is called whenever I change one of the members of one of the FMyStruct instances in the TArray. How can I find the index in the TArray of the changed instance?
I know how to get the index in PostEditChangeChainProperty, FPropertyChangedChainEvent has GetArrayIndex, but in Post it’s too late.
1 Like
There is an overload that receives an FEditPropertyChain
I have seen that but how do I go from an FProperty, which is what the chain contains, to an array index? There is no overload that receives a FPropertyChangedChainEvent, unfortunately.
I am not sure what are you trying to achieve, but if there is no premade method to do that, you can implement it manually, for example storing the index in a variable (perhaps int LastChangedItemIndex;
) inside the method that is changing it.