I have a RoomActor.cpp and a RoomActor.h whose parent class is an AActor.
And I have another class called RoomGenerator.cpp and a RoomGenerator.h.
Is there a way for me to create a RoomActor inside my RoomGenerator Class?
I have a RoomActor.cpp and a RoomActor.h whose parent class is an AActor.
And I have another class called RoomGenerator.cpp and a RoomGenerator.h.
Is there a way for me to create a RoomActor inside my RoomGenerator Class?
As a follow up question, can I add multiple headers in a class?
If yes, how?
if you want the opportunity to use this class in the Editor - you can create UChildActorComponent in your class constructor. If you want only runtime generation - just spawn and use that reference farther.
for multiple headers - like in the normal cpp, but to preventing cyclic references use forward declaration in a header and just include in a cpp.
ps: necro, but for future generations)