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
I am trying out creating a game in react with ion-phaser and I am running into this problem that I cannot add 2 different scenes to the game config.
This is how App.js looks like. I notice that only the last scene in the Array (GameScene) is loaded. If I invert the order in the array, only the other one is loaded.
import React from 'react'
import Phaser from 'phaser'
import { IonPhaser } from '@ion-phaser/react'
import { BootScene } from "./BootScene"
import { GameScene } from "./GameScene"
function App() {
const state = {
initialize: true,
game: {
width: "100%",
height: "100%",
type: Phaser.AUTO,
scene: [BootScene, GameScene]
}
}
const { initialize, game } = state
return (
<div className="App">
<IonPhaser game={game} initialize={initialize} />
</div>
);
}
export default App;
I tried out in a simple HTML with just pure phase and both Scenes are loaded normally.
Hi, thanks for the work on this.
I am trying out creating a game in react with ion-phaser and I am running into this problem that I cannot add 2 different scenes to the game config.
This is how App.js looks like. I notice that only the last scene in the Array (GameScene) is loaded. If I invert the order in the array, only the other one is loaded.
I tried out in a simple HTML with just pure phase and both Scenes are loaded normally.
Here's a simple repo for reproducing:
https://github.com/gilbertoalmeida/ion-phaser-2-scenes
The text was updated successfully, but these errors were encountered: