As I’m diving deeper into Unreal C++ I start to have some problems make some trivial tasks.
A C++ Actor cannot be directly edited in the editor like a BP does (am I wrong on this?).
So, I’ve been creating BP actors derived from my C++ classes so I can edited them and those are the actors I use in my maps ( to set the Static Mesh for instance).
This brings me a problem,. If I’m using BP actors, how can spawn one of those actors from C++ as C++ doesn’t know about BP?
I know I can do this:
In my character c++:
UPROPERTY(EditAnywhere, BlueprintReadOnly) TSubclassOf<class CActorToSpawn > ActorToSpawn;
And then set this in the character BP and then spawn ActorToSpawn from C++.
But is there another way? What if there are 10 different actors to spawn?