Hello
I’m quite new to Unreal4 and now want to have a try of the AI system with C++ by following this video tutorial : Unreal Engine 4 C++ Tutorial Version 4.0.2: Basic Artificial Intelligence - YouTube
But I got an error in the constructor of a class inherited from AAIController.
In the video, the constructor written in this way:
ATutorial_Controller::ATutorial_Controller(const class FPostConstructInitializeProperties &PCIP) : Super(PCIP)
{
...
}
Obviously it’s out of date, So I tried to make a default constructor
ATutorial_Controller::ATutorial_Controller()
{
}
Then an “out-of-line definition does not match any declaration” error occurred.
And I tried the way which is used by the engine’s class which is inherited from AAIController like ADetourCrowdAIController.
ATutorial_Controller::ATutorial_Controller(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer.SetDefaultSubobjectClass(TEXT("PathFollowingComponent")))
{
}
This one also went to error.
I searched a lot but can’t find useful information. Does anybody know why both of them are wrong and which is the right way? Thank you.