question

Dylan Hunt avatar image
Dylan Hunt asked

Inconsistent Unity SDK doc with Photon + Reference question

EDIT: Updated

Looking at the 1st set of code @

https://api.playfab.com/docs/using-photon-with-playfab/

// callback on successful LoginToPlayFab request
void OnLoginSuccess(LoginResult result)
{
  StartCoroutine(GetUserStats());
  this.playfabId = result.PlayFabId;
  GetPhotonAuthenticationTokenRequest request = new GetPhotonAuthenticationTokenRequest();
  request.PhotonApplicationId = photonComponent.AppId.Trim();

  // get an authentication ticket to pass on to Photon
  PlayFabClientAPI.GetPhotonAuthenticationToken(request, OnPhotonAuthenticationSuccess, OnPlayFabError);
}
  1. PlayFab should probably include the shorthand callback instead of just OnWhatever and leaving out the new function in the doc. Perhaps the average person should know to create a new callback for the On--'s, but for consistency's sake and better not to assume, the Photon tutorial code should match the other sdk code (=>). 

    Even the naming conventions don't match the other docs.

    On the Photon intro docs, it's even more different. It's just different enough to make it confusing, considering it's technical document that requires consistency.

    (Also, "Types" for the result should be written so that intellisense lists your options -- which isn't consistent with the other docs, but probably SHOULD be). Or at least a debug.console example showing what to look for.

  2. I need help on this part (Also see below for what the docs should be similar to, minus my mistakes,with the callbacks included like shown in the other docs. Doc examples should be able to copy+paste and it just works):



    photonComponent is not found. Sure I could just post my app id itself, but I'd rather do things the right way. Is this an arbitrary name to my photon class from the photon SDK? Or should this actually be a reference within the playfab SDK? I somehow feel that the Photon guide is ... out of sequence.

    Just making sure I'm doing this right.

10 |1200

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

brendan avatar image
brendan answered

It is indeed the case that our documentation assumes some familiarity with our SDK calls. A good place to start is our https://api.playfab.com/docs/beginners-guide, as it provides an overview of our calling pattern. And while I do agree that the PlayFab docs and samples should be consistent (and I'll call this out to the tools team, so that they can update this on their next pass), we do not control the documentation on the Exit Games site. I'll pass along your suggestion to their team, but please be aware that we are two completely distinct companies, with separate teams working to provide documentation and samples - there are bound to be differences there.

For the second part, yes, photonComponent was an arbitrary choice. You could make it part of your PlayFab Settings or another global variable.

10 |1200

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

Dylan Hunt avatar image
Dylan Hunt answered

Cheers for the response~

I sent a message to Photon about their demos integrated with PlayFab, and they claim PLAYFAB's docs, rather than theirs, are out-of-date. "Obviously" (Photon support is always rude as ... perhaps I should just avoid Photon altogether, if they treat their customers that way. I know you guys are separate entities, but it looks bad on PlayFab since there's a very close association from the public eye -- keep an eye on those guys).


https://i.imgur.com/oaPE3CO.png

10 |1200

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

brendan avatar image
brendan answered

Sorry for the confusion on this. We did some digging on this, and the Exit Games folks are essentially correct - they submitted a change to our GitHub repo for the Photon integration code which we accepted, but it wasn't clear that documentation changes were needed, so we missed that. We're updating the docs now, to account for their changes.

And to provide a little context on the Exit Games team, please bear in mind that they're in Germany and are working across a language difference. Their English is excellent, which is why it's easy to forget this, but I'm sure there'll be some occasional bumps in the communications due to that. Having met with the team many times now, I can say that they're absolutely committed to providing the best service possible for their customers.  :)

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.