GetWorld() or this

Hello, I’m quite confused when do we need to pass in this or GetWorld()
What is exactly GetWorld()?
When we are passing arguments inside GetAllActorsOfClass() why can’t we pass GetWorld as a first paramenter.
I don’t really understand how to know what to pass in const UObject* WorldContextObject arguments? When will we need to pass anything else, but “this”?

You can.

Anything that exists in the same game world you’re trying to get.

When this isn’t in the same game world.

1 Like

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

Privacy & Terms