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

49_bt_urc
unreal-cpp

#1

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:


#2

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


#3

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?


#4

I am having that problem.Thanks for the solution!


#5

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?


#6

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


#7

Look at my solution if u are still stucked.


#8

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