I am working on Battle Tank, and at this particular lesson, that uses SuggestProjectileVelocity
method, I am a bit confused. So my question is:
I know I have to #include "Kismet/GameplayStatics.h"
at the top. But why do I have to include the class name when calling it like this: UGameplayStatics::SuggestProjectileVelocity(...)
? It always spits out error when compiling if I don’t include the class name. Then what is the point of #include anyway? Can’t I just call SuggestProjectileVelocity(...)
only, once I have #include "Kismet/GameplayStatics.h"
?
If someone can explain this clearly, I’d really appreciate.