Popular Content

Showing content with the highest reputation on 11/26/19 in all areas

  1. 1 point

    Playfab Plugin?

    An update about this thread, to sum it up, thanks @enpu, it works. For some reason, my PC's Panda IDE was an old version and it might have caused the issue. So here are the steps : Download latest panda IDE Update the engine to the latest in your project Download PlayFabClientApi.js from https://download.playfab.com/PlayFabClientApi.js into the media folder Add game.addAsset('PlayFabClientApi.js') to your game.main Add the following snippet to test whether it works (I used it in init of game.main), ideally when you run this in the IDE or the browser, a player will be created on PlayFab : var loginRequest = { TitleId: '<your game ID>', CustomId: <custom ID>, CreateAccount: true }; PlayFabClientSDK.LoginWithCustomID(loginRequest, function(result, error) { if (!error) { console.log('PF ID: ' + result.data.PlayFabId); } else { console.log(error);} }); As a next step, I prefer to make PlayFabClientApi.js into a plugin, like the instantgames plugin and load the script dynamically and not bundle it with the package. I shall keep this thread updated if the plugin is a success, or maybe drop if off in the plugins sub forum. Once again, thanks @enpu! @Stephan, there you go, done! Time to start with the game, yay!