I would like to thank you for making me doubt my code, it was indeed the problem so this no longer is a bug report. It is related to my code and I could narrow down the problem to this extent:
void AProductGroup::CullXRow(FProductRowX &RowToDestroy)
{
// Determine if should add or remove products // This one removes
if (RowToDestroy.Products->GetInstanceCount() > ProductPlacementX)
{
for (int i = RowToDestroy.Products->GetInstanceCount() - 1; i >= ProductPlacementX ; i--)
{
UE_LOG(LogTemp, Warning, TEXT("Destroyed Product: %d"), i);
RowToDestroy.Products->RemoveInstance(i);
}
}
// This one adds
else if (RowToDestroy.Products->GetInstanceCount() < ProductPlacementX)
{
FVector meshOrigin;
FVector meshExtent;
float sphereRadius;
UKismetSystemLibrary::GetComponentBounds(ArrowMesh, meshOrigin, meshExtent, sphereRadius);
for (int i = RowToDestroy.Products->GetInstanceCount(); i < ProductPlacementX; i++)
{
int asdf = RowToDestroy.Products->AddInstance(FTransform(FVector(meshExtent.X + (((meshExtent * 2).X + GapBetweenProducts)*i), 0, 0)));
UE_LOG(LogTemp, Warning, TEXT("Created Product: %d"), asdf);
}
}
}
This code adds or removes a new instance depending on the variable ProductPlacementX. If lets say, there should be 4 items and it has 3, it adds a new instance. And this method is called here for every other dimensions I have: To be continued