5

I am trying google realtime multiplayer for the very 1st time in my unity game. QuickMatch is working just fine, I mean I am able to get the connected participant's ID and store it to a string using:

string MyId = PlayGamesPlatform.Instance.RealTime.GetSelf ().ParticipantId;

//string frndId = PlayGamesPlatform.Instance.RealTime.GetParticipant ();
//Get all opponent's ID
List<Participant> playerIDs = PlayGamesPlatform.Instance.RealTime.GetConnectedParticipants ();

if (MyId == playerIDs [0].ParticipantId) {

    oppoUsarname = playerIDs [1].DisplayName.ToString ();
    multiplayersName [1].text = "nothosting" + oppoUsarname;
    gameHost = true;

    OppoID = playerIDs [1].ParticipantId;

    OppoDN = playerIDs [1].DisplayName.ToString ();
} else {
    oppoUsarname = playerIDs [0].DisplayName.ToString ();
    multiplayersName [1].text = "gamehoster" + oppoUsarname;
    gameHost = false;
     OppoID = playerIDs [0].ParticipantId;
     OppoDN = playerIDs [0].DisplayName.ToString ();
}

just after an opponent connect to the room I can show his displayname. But for CreateWithInvitationScreen I want to get the invited (whom I have invited using invitation screen) participant's ID even when they have not accepted the invitation or connected to the room... can anyone tell me how to do it?

CSDev
  • 3,177
  • 6
  • 19
  • 37
Sumit Pal
  • 235
  • 1
  • 3
  • 13
  • Have you tried checking the featured [documentation in Android](https://developers.google.com/games/services/) specifically for [unity](https://github.com/playgameservices/play-games-plugin-for-unity)? – MαπμQμαπkγVπ.0 Oct 11 '18 at 11:42
  • @MαπμQμαπkγVπ.0 I have tried it all... couldn't find a way to get the invited user's id. i am pretty sure it is very easy, but not getting any clue on how to do it correctly. – Sumit Pal Oct 11 '18 at 14:49

0 Answers0