Getting PlayerController Object from GameMode

I cannot find the way of getting instantiated playercontroller object. I want to assign it into a pointer inside the gamemode like this:

ACloudController* Controller = <<missing part>> ;

The GameMode is a server only type.

The GameState is replicated to all clients from the server and has a list of PlayerStates. The PlayerState’s owner is the owning player controller.

You can also access all the players via the world: GetWorld()->GetPlayerControllerIterator(). AGameMode::ProcessClientTravel does this.

2 Likes