Ok, things I see in the code:
-
“TArray< TSubclassOf < MyClass > MyClassList;” should be “TArray< TSubclassOf < AMyClass > > MyClassList;”.
-
You are iterating over the size of MyClassList, but then accessing TeamList[i] (not necessarily wrong, but make sure it’s not a copy-paste mistake, happens sometimes ;P). Also, I have no idea what type TeamList is, so the problem could be there.
-
When you access GetDefaultObject, make sure the CDO is what you want, and not the actual object.