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
Phaser Version: 3.24.1 and 3.55.2 (tested on both)
Operating system: Win10
Browser: Chrome, Firefox, Edge (any)
Description
Code pasted below produces 2 objects on screen (visually for sure, unsure about memory, however both objects are offset by 400 pixels from their initial position after the execution, which makes me think that its reference-related, not the object being duplicated in memory).
Example Test Code
// create/add image to scene const myImage = this.add.image(0, 0, "myImgTex", "myImgFrame.png"); // now add the same image to container myContainer.add(myImage); // now add the same image back to scene this.add.existing(myImage); myImage.setPosition(400, 0);
Additional Information
Does it affect other GameObjecttypes (sprite/graphics/particles/..)? Untested.
calling myContainer.remove(myImage); does remove the duplicate image from Container visually (not sure about memory, and does it really clear the reference? - idk how to test this properly using browser's profiler) - would this be a reasonable way to hotfix/hack this issue until proper bugfix is implemented?
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
Code pasted below produces 2 objects on screen (visually for sure, unsure about memory, however both objects are offset by 400 pixels from their initial position after the execution, which makes me think that its reference-related, not the object being duplicated in memory).
Example Test Code
// create/add image to scene const myImage = this.add.image(0, 0, "myImgTex", "myImgFrame.png"); // now add the same image to container myContainer.add(myImage); // now add the same image back to scene this.add.existing(myImage); myImage.setPosition(400, 0);
Additional Information
myContainer.remove(myImage);
does remove the duplicate image from Container visually (not sure about memory, and does it really clear the reference? - idk how to test this properly using browser's profiler) - would this be a reasonable way to hotfix/hack this issue until proper bugfix is implemented?The text was updated successfully, but these errors were encountered: