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 using a scene as an inventory window, so it is above another scene.
When I try to hide the scene using scene.sleep(), GameObject.DomElement still remains to be seen after scene's visibility is set to off.
I expected it to disappear, like other gameobjects like image.
Example Test Code
classTest1extendsPhaser.Scene{constructor(){super('test1')}create(){scene.launch('test2');}}classTest2extendsPhaser.Scene{constructor(){super('test2')}create(){consttext=this.add.dom(0,0,'p',{},'test');this.scene.sleep();// text remains in the screen.});}}constgame=newPhaser.Game({type: Phaser.AUTO,width: 800,height: 800,backgroundColor: '#111111',scale: {mode: Phaser.Scale.FIT,autoCenter: Phaser.Scale.CENTER_BOTH},scene: [Test1,Test2]})
The text was updated successfully, but these errors were encountered:
jhoryong
changed the title
GameObject.DomElement still exists after scene's visibility set to off
GameObject.DomElement still exists after scene sleep
Dec 18, 2024
Version
Description
I am using a scene as an inventory window, so it is above another scene.
When I try to hide the scene using
scene.sleep()
,GameObject.DomElement
still remains to be seen after scene's visibility is set to off.I expected it to disappear, like other gameobjects like image.
Example Test Code
The text was updated successfully, but these errors were encountered: