Last active
August 3, 2019 08:16
-
-
Save 314pies/02734314289f4ceb50f3cb01c206ce73 to your computer and use it in GitHub Desktop.
Server side PlayFabMultiplayerAPI.GetMatch() example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Unity C# | |
PlayFabSettings.TitleId = "Your Title Id"; | |
PlayFabSettings.DeveloperSecretKey = "Your Developer Secret Key"; | |
PlayFabAuthenticationAPI.GetEntityToken(new GetEntityTokenRequest { }, | |
res => | |
{ | |
Debug.Log(res); | |
Debug.Log(res.Entity.Id);//Should be the title id | |
Debug.Log(res.EntityToken); | |
Debug.Log(res.Entity.Type);//Should be "title" | |
//Invoke PlayFabMultiplayerAPI.GetMatch() after getting EntityToken | |
PlayFabMultiplayerAPI.GetMatch( | |
new GetMatchRequest | |
{ | |
MatchId = "YourMatchId", | |
QueueName = "YourQueueName", | |
ReturnMemberAttributes = true | |
}, | |
res2 => { Debug.Log(res2); }, err2 => { Debug.Log(err2); } | |
); | |
}, | |
err => { Debug.Log(err); } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment