Activating AWS GameLift GameSession and PlayerSession

Since it took me awhile to figure out how to properly set new GameSessions and PlayerSessions, here are the settings which worked for me.

After creating a new GameLift CreateGameSession add a delay, then Activate the new GameSession. Without the delay the ActivateGameSession may fire to quickly. Notice that if the GameSession hasn’t been activated all subsequent playersessions will timeout.

There are different ways to implement AcceptPlayerSession - here we use the PlayerController, after the server map loaded. This way map load times are not important. To avoid Controller code to be run for the session, the GetCurrentLevelName checks if we are on a GameSession map.

Your project may use different nodes - but they access the same GameLift SDK functions.