The debug output of this says the TArray “complist” has 2 elements within it. However, when I iterate over the TArray and debug output each item, it only outputs one item, a “PhysicsHandle”. However, as I built the blueprint for this item myself, I know it also has a “StaticMesh” component as the root. When looking through a TArray of components, is the root component just not shown when it’s iterated over? The code is as belows:**
TArray<UActorComponent*, FDefaultAllocator> complist;
obj->GetComponents(complist);
GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Yellow, FString::FromInt(complist.Num()));
for (int i = 0; i < complist.Num(); i++)
{
GEngine->AddOnScreenDebugMessage(-2, 10.f, FColor::Yellow, complist[i]->GetName());
}
I’m a bit confused as to why my debug iteration is not outputting the “StaticMesh” name.
Please let me know if you need more information, and any light you could shed on this would be appreciated!