now i found this working, generated native blueprint code and filtered 130 lines of code , but this is still not efficient, locations are not correct as expected
if (::IsValid(ItemGroupRef))
{
ItemGroupRef->GetAllTransforms(Available);
}
RandomLocation(Available, Location);
int32 Index = FCustomThunkTemplates::Array_Find(UsedLocations, Location);
bool bIndexDuplicated = UKismetMathLibrary::EqualEqual_IntInt(Index, -1);
if (!bIndexDuplicated)
{
RandomLocation(Available, Location);
}
else
{
SpawnLocation = Location;
UsedLocations.Add(SpawnLocation);
}
