Hey .
add another Expression which checks if *It != USkeletalMeshComponent::StaticClass()
for(TObjectIterator<UClass> It; It; ++It)
{
if(It->IsChildOf(BaseClass::StaticClass()) && !It->HasAnyClassFlags(CLASS_Abstract))
{
if(*It != USkeletalMeshComponent::StaticClass())
{
Subclasses.Add(*It);
}
else
{
UE_LOG(LogTemp, Warning, TEXT("Found SkeletalMeshComponent. Did not add it"));
}
}
}