UAIPerceptionComponent Implementation help

Hello,
So I am starting to create my enemies and I saw this AIPerceptionComponent. Every time I try to implement this system on my AI controller I get Errors. This is the code I found:

SetPerceptionComponent(ObjectInitializer.CreateDefaultSubobject<UAIPerceptionComponent>(this, TEXT("Sense")));

These are the errors:

 d:\program files\unrealengine-4.13\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(760): error C2027: use of undefined type 'UAIPerceptionComponent'

 D:\Program Files\UnrealEngine-4.13\Engine\Source\Runtime\AIModule\Classes\AIController.h(24): note: see declaration of 'UAIPerceptionComponent'

 D:\Documents\Unreal Projects\HorrorGame 4.13 - 2\Source\HorrorGame\MobAI.cpp(8): note: see reference to function template instantiation 'TReturnType *FObjectInitializer::CreateDefaultSubobject<UAIPerceptionComponent>(UObject *,FName,bool) const' being compiled
           with
          [
              TReturnType=UAIPerceptionComponent
         ]

d:\program files\unrealengine-4.13\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(760): error C3861: 'StaticClass': identifier not found

d:\program files\unrealengine-4.13\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(761): error C2440: 'static_cast': cannot convert from 'UObject *' to 'UAIPerceptionComponent *'

d:\program files\unrealengine-4.13\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(761): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

The compiler tries to tell you it has no idea what UAIPerceptionComponent is. You need to include its header, like so:

#include "Perception/AIPerceptionComponent.h"

Cheers,

–mieszko

Oh, Wow, I cannot believe I did not think of that.Thank You worked like a charm.