Hi,
Should be a simple question for experts.
I’ve created a new project C++/TopDown in version 4.13.2.
Added a new class based off the AIController. Below are the .h and .cpp files:
ABaseAIController.h
UCLASS()
class BASEMECH_API ABaseAIController : public AAIController
{
GENERATED_BODY()
public:
ABaseAIController();
void BeginPlay() override;
};
ABaseAIController.cpp
ABaseAIController::ABaseAIController():Super() {
//initialization here
UE_LOG(LogClass, Log, TEXT("IN Initialize AIController@@@@@@@@@"));
}
void ABaseAIController::BeginPlay() {
//Stuff like get controlling pawn etc.
UE_LOG(LogClass, Log, TEXT("IN Begin Play AI@@@@@@@@@@@@@@"));
}
This is my Character class BaseMechCharacter.cpp and I’ve just added one line of code [well two including the comment] at the end of the constructor method:
//Setup AI Class
AIControllerClass = ABaseAIController::StaticClass();
When I hit play, I was expecting to see the log in init and the log in BeginPlay. I do see the log from constructor, pretty much after the compilation. But I don’t see the log from BeginPlay after I’ve hit play.
So, I thought, it’s probably because the template character spawns the blueprint, so I edited the blueprint and selected the above mentioned class from the dropdown for AIClass, and yet still not log from being play.
What am I missing??
Regards,