I have found a another way. Instead of inheriting from ADetourCrowdAIController, I add : Super(ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT(“PathFollowingComponent”))) to my constructor.
I realise this post is from a while back and you found an alternative, but if anyone else comes across it the reason for the link errors is that ADetourCrowdAIController is missing the AI Module API macro in it’s header:
class AIMODULE_API ADetourCrowdAIController : public AAIController
I too have this issue. haisong’s workaround appears to work, but an actual fix appears to be to add the missing AIMODULE_API macro in the engine source. It is still missing as of 4.21.1.
Using the super constructor to override the PathFollowingComponent in the base class the way haisong has done is not a workaround but the way it was meant be done.
I found this thread when converting to 4.23. I did have my AIController inheriting from ADetourCrowdAIController and could no longer compile. I did the following but it doesn’t work. I admit that I don’t understand syntactically how to make this work. Could someone comment on what I might have wrong here:
I changed the inheritance in my h file to inherit only from AAIController and added my constructor with the FObjectInitializer as follows:
UCLASS()
class NEVERMEMORY_API AFPSAIController : public AAIController //ADetourCrowdAIController
{
GENERATED_BODY()
AFPSAIController(const FObjectInitializer& ObjectInitializer);
I added in the include file as “#include Navigation/CrowdManager.h”
After this I now get a compiler error from a macro in the engine source of:
Incomplete definition of type ‘UCrowdFollowingComponent’
Incomplete type ‘UCrowdFollowingComponent’ named in nested name specifier
Being lost here, I’m wondering if someone could tell me what I’ve done wrong, I’ve attempted to follow what the documentation states as noted above in haisong’s link.