this.playfabId = result.PlayFabId; GetPhotonAuthenticationTokenRequest request = new GetPhotonAuthenticationTokenRequest(); request.PhotonApplicationId = photonComponent.AppId.Trim();
but the code photonComponent.AppId.Trim();
is not quite making sense..
my question is what should i do to get photon app id via script?
should is set as const value/ set from inspector??
wouldn't there be any smarter options..?
Answer by Brendan · Feb 17 at 10:09 PM
Our integration with Photon Cloud includes simplified authentication using the auth token API you mentioned above, and pre-configured calls into Cloud Script handlers for your Photon Realtime webhooks. However, to use Photon Cloud, you would need to use the Photon API calls (usually using their SDK) for all the Lobby/Room logic, which requires that you have the App ID in your game somewhere. Rather than adding it to the PlayFabSettings in our SDK (which would force you to define it twice in your project), the sample is showing where to add the ID in your calls to our service. You obtain the ID via the Photon page in the Add-ons Marketplace for your title.