Though I DID need to do the #include for PhysicsHandleComponent, I did NOT have to do so for the Input Component. Why would that be?
Just when I think I’ve got a handle on how/why things work, something happens that defies my understanding.
Though I DID need to do the #include for PhysicsHandleComponent, I did NOT have to do so for the Input Component. Why would that be?
Just when I think I’ve got a handle on how/why things work, something happens that defies my understanding.
right!? What the heck! It might be part of actor components header. I’m unsure though
Is there anyone here know exactly what caused this? I have a similar situation, using UE 4 .17.1, and would like to know why the engine does this. I got no error when not using #include “Component…”, just simply the auto complete for BindAction did not appear on Visual Studio. But if i use #include, then it will break. Would love to hear some explanation.
If you open the PhysicsHandleComponent header, you’ll see that it includes the ActorComponent header.
In 4.17.2, if I include “InputComponent.h”, the bind action doesn’t work. When I remove it, the bind action works just fine.
I found that, It only applies to different Unreal Engine and Visual Studious Version. In the past it might have effected it, but now most of Visual Studious code seem to work without the extra # include, mentioned by Sam. I have only tried this on Windows not sure if Mac versions apply.
Hello,
to correct that it is necessary to include on header file:
class UInputComponent;
just before the UCLASS(…)
On the cpp it is necessary to include the:
#include “PhysicsEngine/PhysicsHandleComponent.h”