Get index of element changed in array

I’ve tried another idea, of putting another UPROPERTY on the struct called bStructChanged, set to false by default, then in the PostEditChangeProperty method, I’ve declared a FField* Field variable and looped through the linked list of properties provided by FField* until I reach the bStructChanged field.

At this point, I initialize an FBoolProperty* BoolProperty variable with a CastField on the Field variable from before, and if the cast is successful, I try calling SetPropertyValue on the BoolProperty and setting it true, then will later loop through the structs in the array to find the element where bStructChanged is true…

But, it looks like SetPropertyValue requires a pointer to the actual variable, which I don’t know which variable it is since I don’t know which struct it belongs to in the array lol.

FField* Field = e.Property;
FField* NextField = Field->Next;

while (NextField->GetFName() != "bStructChanged" && NextField->Next)
{
	NextField = NextField->Next;
}
if (NextField->GetFName() == "bStructChanged")
{
	FBoolProperty* BoolProperty = CastField<FBoolProperty>(NextField);
	if (BoolProperty)
		BoolProperty->SetPropertyValue(BoolProperty, true);
}