void UpdateGameSession() { if (myGameSession == null) { Debug.Log("1"); return; } Debug.Log("2"); UpdateGameSessionRequest updateGameSessionRequest = new UpdateGameSessionRequest() { GameSessionId = myGameSession.GameSessionId, MaximumPlayerSessionCount = 12 // GameSessionId = gameSession.GameSessionId, }; try { Debug.Log("Updating game session"); UGSR = m_Client.UpdateGameSession(updateGameSessionRequest); Debug.Log("Done Updating game session"); } catch (Exception ex) { Handler(ex); } if (UGSR != null) { Debug.Log(UGSR.GameSession.MaximumPlayerSessionCount); } //return updateGameSessionResponse.GameSession; }
public GameSession UpdateGameSession(GameSession gameSession) { if (gameSession == null) { return(null); } UpdateGameSessionRequest updateGameSessionRequest = new UpdateGameSessionRequest() { GameSessionId = gameSession.GameSessionId, }; var updateGameSessionResponse = M_gameLiftClient.UpdateGameSession(updateGameSessionRequest); return(updateGameSessionResponse.GameSession); }
public async Task <UpdateGameSessionResponse> UpdateGameSessionAsync(UpdateGameSessionRequest request) { var response = ServiceMessageFactory <UpdateGameSessionResponse> .CreateFrom(request); var gameSession = cache.FirstOrDefault(i => i.Id == request.GameSession.Id); if (gameSession != null) { gameSession.CurrentPlayerId = request.GameSession.CurrentPlayerId; response.GameSession = gameSession; } else { response.Errors += "Unable to find game session to update."; logger.LogError($"Unable to find game session ({gameSession.Id}) to update."); } return(await Task.FromResult(response)); }
public void UpdateGameSessionAsync(UpdateGameSessionRequest request, AmazonServiceCallback <UpdateGameSessionRequest, UpdateGameSessionResponse> callback, AsyncOptions options = null) { throw new System.NotImplementedException(); }