I’m trying to compare two different UInstanceStaticMeshComponents to see if they have any overlapping instances, then remove those instances from both.
Gives me a C3867 error: 'UInstancedStaticMeshComponent::GetInstanceTransform': function call missing argument list; use '&UInstancedStaticMeshComponent::GetInstanceTransform' to create a pointer to member
I tried then to use
if (&ParentRect->WExtStraightMesh->GetInstanceTransform[b] == &WExtStraightMesh->GetInstanceTransform[a])
{
&WExtStraightMesh->RemoveInstance[a];
&WExtStraightMesh->RemoveInstance[a];
}
to no avail. How would I use pointers in this scenario?
,You are trying to modify collections whilst iterating over them and most likely walking off the end of one of them when iterating. And you are also skipping the next member when removing a member. You should only increment (++a, ++b) when not removing a member. That’s what I’m reading.