Hi All,
I’m having an odd issue with one of my Blueprint callable C++ functions. The C++ code is as follows:
// Spawn new battle unit on the battlefield at the selected spawn location
UFUNCTION(BlueprintCallable, Category = "SpawnActor")
void SpawnUnit(UPARAM() TSubclassOf<class ABattleUnitBase> UnitType, FVector const& SpawnLocation);
Essentially I have a unit manager class, which holds a pointer to all spawned units on the map. I want to specify which BP variation of my base unit class I’d like to spawn, because I would like to extend all customisation of the C++ base class to BP. Now the problem is that even though both BP classes inherit from the same C++ base class, the object that always gets spawned is the white one. I tripple checked the class defaults of both BP classes, they both inherit from the same C++ base class. I would appreciate any feedback or suggestions! Thank you.