You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.
to the index.html file head. I also tried adding it to the body above the comment line where scripts are injected.
I also added
new webpack.DefinePlugin({
// Required by Phaser: Enable Canvas and WebGL renderers.
'CANVAS_RENDERER': JSON.stringify(true),
'WEBGL_RENDERER': JSON.stringify(true),
'PLUGIN_FBINSTANT': JSON.stringify(true)
}),
to the gulpfile.js/webpack/config/plugins.js file but I get the FBInstant is not defined when I add this to my index.js file
export function boot() {
return new Phaser.Game(config);
}
FBInstant.initializeAsync().then(function() {
FBInstant.setLoadingProgress(100);
FBInstant.startGameAsync().then(function() {
boot();
});
});
Any idea what I'm doing wrong? Other development environments do this and it works great, but this generated development environment is the best I've found yet and I would love to make it my go to project creator.
Thanks for your work on this generator.
The text was updated successfully, but these errors were encountered:
It's been a while since I made any significant updates to the generator template, and Facebook Instant Games are a recent addition to Phaser I'm not aware of yet. I'll have a look into this issue later.
There are two parts to this plug in. The Facebook SDK referenced by the URL created by Facebook and also Phaser's own plugin phaser-facebook-instant-games.js that exposes calls (this.facebook.call()) within the game code. Thank you for your response.
Node 9.2.1
npm
.yo-rc.json
{
"generator-phaser-plus": {
"meta": {
"createdWith": "3.0.0-beta.7",
"creationDate": "2019-06-03T18:33:31.708Z"
},
"objects": {
"dest": "app/scripts/objects/"
},
"plugins": {
"dest": "app/scripts/plugins/"
},
"scenes": {
"dest": "app/scripts/scenes/",
"index": {
"name": "app/scripts/scenes/index.js",
"requirePath": "./"
}
}
}
}
I have added
<script src="https://connect.facebook.net/en_US/fbinstant.6.2.js"></script>to the index.html file head. I also tried adding it to the body above the comment line where scripts are injected.
I also added
new webpack.DefinePlugin({
// Required by Phaser: Enable Canvas and WebGL renderers.
'CANVAS_RENDERER': JSON.stringify(true),
'WEBGL_RENDERER': JSON.stringify(true),
'PLUGIN_FBINSTANT': JSON.stringify(true)
}),
to the gulpfile.js/webpack/config/plugins.js file but I get the FBInstant is not defined when I add this to my index.js file
export function boot() {
return new Phaser.Game(config);
}
FBInstant.initializeAsync().then(function() {
FBInstant.setLoadingProgress(100);
FBInstant.startGameAsync().then(function() {
boot();
});
});
Any idea what I'm doing wrong? Other development environments do this and it works great, but this generated development environment is the best I've found yet and I would love to make it my go to project creator.
Thanks for your work on this generator.
The text was updated successfully, but these errors were encountered: