Strange Compilation Error After Adding UProjectileMovementComponent to Projectile C++ Code

I got a strange “recompilation” error when trying to compile the C++ code after adding in the UProjectileMovementComponent variable and subobject. I am using a later version of the Unreal Engine (4.20.3 precisely), so I have had to #include “GameFramework/ProjectileMovementComponent.h.” In Visual Studios, no error appears. Any help around this issue would be appreciated.

Screenshots of Code and Unreal Engine Log:


1 Like

Hi all
thanks for posting.
that one would have taken me a wahile to figure out.

Do you happen to know a potential solution to this bug or something I may have done wrong or missed in the code or blueprints based on the screenshots I posted?

I am having that problem.Thanks for the solution!

Sorry, this is not the solution, but a request for one. Again, I have a strange recompilation error with the Unreal Engine, as shown by the screenshots posted in this discussion. Is there a way to fix this?

Hey, for UE4.20 or more, a forward declaration is needed in the projectile.h of the UProjectileComponentMovement class. It worked for me!

1 Like

Look at my solution if u are still stucked.

Look at my solution if u are still stucked.!!!

Privacy & Terms