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);
}
- 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.
- 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.