question

Ozan Yilmaz avatar image
Ozan Yilmaz asked

How to get PlayFab ID from Photon?

Hello everyone,

I've integrated Photon in my title. (https://docs.microsoft.com/en-us/gaming/playfab/sdks/photon/quickstart). I was wondering if there's a way to get PlayFab ID inside of Photon?

There's a code line where I set the custom auth for Photon. I set username as PlayFab ID. I assume, PlayFab ID is somewhere in Photon. I need to get the other players' PlayFab ID. How can I access that?

customAuth.AddAuthParameter("username", _playFabPlayerIdCache);
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

As you can see the customAuth property stores PlayFab ID, and the data will be shared with members when the player joins a room. Since you already use PlayFab as a custom authentication, you may refer to section "Publish UserIDs" section in this document to get Player ID -- https://doc.photonengine.com/zh-CN/realtime/current/lobby-and-matchmaking/userids-and-friends

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.