Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Object has no method 'preUpdate' when scaling the game


Recommended Posts

I'm getting this error when my game is scaled in 1.2:
  1. Uncaught TypeError: Object [object Object] has no method 'preUpdate' phaser.js:25634
    1. Phaser.Stage.preUpdatephaser.js:25634
    2. Phaser.Game.updatephaser.js:28900
    3. Phaser.RequestAnimationFrame.updateRAFphaser.js:43151
    4. _onLoop
The error doesn't appear when playing without any kind of scaling.
The function causing the error is this one:
Phaser.Stage.prototype.preUpdate = function () {        this.currentRenderOrderID = 0;    //  This can't loop in reverse, we need the orderID to be in sequence    var len = this.children.length;    for (var i = 0; i < len; i++)    {        this.children[i].preUpdate();    }}

And this is how I am scaling the game:



this.game.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT;this.game.scale.setShowAll();this.game.scale.refresh();
Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...