To make it clear

So he said the “this” in :" if(GameplayStatics::GetPlayerPawn(this, 0)); " is a reference to the actor class from wich the WorldContext function has been called from. I didn’t really got how this works. So does the slot where we wrote “this” normally require the World(Or Level) and we just replaced it by an actor class? If yes why can we do this? If no, what how does this really work?

this is a pointer to this object i.e. the current instance executing the code. And that is in the world we want to be looking in.

2 Likes

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

Privacy & Terms