question

dan avatar image
dan asked

Setting up Playfab + Photon on Unity... which SDKs do I need?

Hi there,

I'm starting work on a turn-based game using PlayFab and Photon in Unity.

Which SDKs do I need to install?
PlayFab, for sure, but do I need any Photon stuff? Like PUN?

Thanks,
Dan

unity3dphoton
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

·
brendan avatar image
brendan answered

Yes, for Photon specifically, you would also need to use their SDK, in addition to the PlayFab Unity SDK. We pre-integrate as much as we can for our Add-on Marketplace partners, but there will always be some cases where we can't pre-integrate everything. Which Photon SDK you use is going to depend upon which of their technologies you want to use, though. What's the goal? Realtime connected players, obviously, but do you need lobbies/rooms, or is this intended to be more peer-to-peer? Do you need server-side authority for the game logic?

4 comments
10 |1200

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

dan avatar image dan commented ·

Thanks, Brendan.
We are making a turn-based game, so no need for full on real-time multiplayer. Our aim is to replicate the basic flow and functionality of Game Center multiplayer (which we used on our last app):

Start a room -> invite friends -> update the game state at the end of each turn.

As our app uses PlayMaker extensively, it would be great if the appropriate Photon SDK would be the PUN SDK from the Unity Asset Store as there are already loads of PlayMaker actions for this SDK.

There's a page on the Photon site (which I can't seem to find again) that tells you which SDKs you need based on your deployment. If you select MULTIPLAYER + PLAYFAB + UNITY it says you just need the Playfab Unity SDK... which can't be right.

Thanks once again for your help! :D

0 Likes 0 ·
brendan avatar image brendan ♦♦ dan commented ·

Yes, that's incorrect. The PlayFab Unity SDK wraps up all our calls to make using them simple (though they're all Web API calls, so it not strictly speaking necessary), while you would use one of the Photon SDKs for connecting to their service. If you want to use PUN, there's nothing preventing that - you'd simply use the Photon App ID you get directly from them. There's nothing about our SDK which would cause an issue in that case.

0 Likes 0 ·
dan avatar image dan brendan ♦♦ commented ·

Thanks once again!

Quick question...
When setting up PUN, how do I set up the PhotonServerSettings?


I got the IDs from PlayFab, but I just wanted to make sure I have the Hosting info (at the top) correct, because, if I understand correctly, PlayFab uses a special Photon server. Is this right?

0 Likes 0 ·
setup.jpg (48.2 KiB)
Show more comments

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.