C++ Error C2679: Binary '=': no operator found which takes right-hand operand of type 'TArray'

Okay it appears GetBlueprintClass() doesn’t do what I expected. Use BP->GeneratedClass->GetDefaultObject() instead (better to leave off the < ASoldier > since I don’t know your exact class hierarchy and you’re just going to cast it to IUnit anyway). Then it would be BP->GeneratedClass which you should add to your array. Hopefully that should work!