question

panayiotismilios avatar image
panayiotismilios asked

Setting up Playfab with Phaser (Error)

Hi,

I'm trying to set up playfab with phaser.io and i'm following the getting started guide. Anyway i get this error in my console.log.

My index file is this:

And that's the code in my main.js file:

var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });

function preload() {
}

function create() {
    game.PlayFab = game.plugins.add(Phaser.Plugin.PlayFab);
    
}



function update() {
}

It's all pretty basic since i only try to implement the example. Any help?

screenshot-3.png (63.3 KiB)
screenshot-1.png (31.5 KiB)
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

·
JayZuo avatar image
JayZuo answered

The problem here is that PlayFab's JavaScript SDK is integrated with Phaser 2 and according to your screenshot, you are using Phaser 3 which has a brand new plugin system. To make your code work, you will need to download and use Phaser CE here: https://github.com/photonstorm/phaser-ce/releases.

5 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.

panayiotismilios avatar image panayiotismilios commented ·

Do you know if they'll add support for Phaser 3?

0 Likes 0 ·
brendan avatar image brendan panayiotismilios commented ·

We do have a backlog item to test against Phaser 3 and update as needed, but we don't have a specific date for that just yet.

0 Likes 0 ·
panayiotismilios avatar image panayiotismilios brendan commented ·

Ok. Should i get the javascript SDK then and proceed from there? Do you think that this would work?

1 Like 1 ·
Show more comments
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.