Can I use forward declaration with ProjectileMovementComponent?

Hi! I have a question what’s the difference between add #include “GameFramework/ProjectileMovementComponent.h” and class ProjectileMovementComponent (Forward Declaration) in Projectile.h?

If all you need is the fact that UProjectileMovementComponent is a class and you’re using it as a pointer, then yes. Forward declare it instead of including.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms