/// <summary> /// Start Matchmaking /// </summary> /// <param name="playerId">The id of the player</param> /// <param name="playerProps">Custom player properties relevant to the matchmaking function</param> /// <param name="groupProps">Custom group properties relevant to the matchmaking function</param> public void RequestMatch(string playerId, MatchmakingPlayerProperties playerProps, MatchmakingGroupProperties groupProps) { player = PlayerUtil.GeneratePlayer(); //request = CreateMatchmakingRequest(playerId, playerProps, groupProps); matchmakingController = new MatchmakingController(Endpoint); matchmakingController.StartRequestMatch(player, GetAssignment, OnError); State = MatchmakingState.Requesting; Debug.Log(State); }
public async void Send() { try { var channel = new Channel("127.0.0.1:50504", ChannelCredentials.Insecure); var client = new OpenMatchClient(new Frontend.FrontendClient(channel)); Player player = PlayerUtil.GeneratePlayer(); client.CreatePlayer(player); await client.GetUpdates(player, Response); channel.ShutdownAsync().Wait(); } catch (Exception e) { Response.text = "exception: " + e.Message; } }