UObjectGlobals.h(641): error C2027: use of undefined type 'UPawnSensingComponent'
UObjectGlobals.h(641): error C3861: 'StaticClass': identifier not found
UObjectGlobals.h(642): error C2440: 'static_cast' : cannot convert from 'UObject *' to 'UPawnSensingComponent *'
UPawnSensingComponent is part of AIModule which is not included by default to the project, to add it, in your project building script (ProjectName.Build.cs in source directory) modify this part like this
Well you could try including header files where UPawnSensingComponent is declared with #include Perception/PawnSensingComponent.h, or in your header file (note that you got errors there not in cpp) when you use UPawnSensingComponent place “class” before that, like this “class UPawnSensingComponent”
I added the #include Perception/PawnSensingComponent.h to my header file and it started working By including the AIModule, shouldn’t those headers be included automatically? Thank you for your help
P.S: I posted a question related to the Pawn Sensing Component about the Make Noise function doesn’t work when it’s called from the client, you wouldn’t happen to know anything about this?