From 8736f0e844c8f924bf129d9364468c2cfa8c250d Mon Sep 17 00:00:00 2001 From: Zeke Chan Date: Thu, 9 Jan 2025 10:19:47 +0800 Subject: [PATCH] Fixed #6893. Boot plugins automatically if config render type is set to Phaser.HEADLESS --- src/plugins/PluginManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/PluginManager.js b/src/plugins/PluginManager.js index 0f0b6abce5..7a9719de09 100644 --- a/src/plugins/PluginManager.js +++ b/src/plugins/PluginManager.js @@ -13,6 +13,7 @@ var GameObjectFactory = require('../gameobjects/GameObjectFactory'); var GetFastValue = require('../utils/object/GetFastValue'); var PluginCache = require('./PluginCache'); var Remove = require('../utils/array/Remove'); +var CONST = require('../const'); /** * @classdesc @@ -113,7 +114,7 @@ var PluginManager = new Class({ */ this._pendingScene = []; - if (game.isBooted) + if (game.isBooted || game.config.renderType === CONST.HEADLESS) { this.boot(); }