Why do we need to use UGameplayStatics?

So comparing to other methods like UWorld::GetWorld(), so far we didn’t need to type UWorld.
But here in this case we have to type UGameplayStatics::GetPlayerPawn. why can’t we just type GetPlayerPawn() ?
I would appeciate if anyone explains it to me.

You aren’t using that function. You’re using this

And you’ve inherited that function, it’s part of your class. UGameplayStatics is a completely different class and members of it are not within your scope.

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

Privacy & Terms