rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.2k stars 260 forks source link

RexUI isn't recognized by VS so can't use intellisense #330

Closed Netherzapdos closed 1 year ago

Netherzapdos commented 1 year ago

Hey everyone, I have installed the rexUI Plugins for Phaser 3 through:

npm i phaser3-rex-plugins

and have modified the config setup as such:

import UIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js'; var config = { // ... plugins: { scene: [{ key: 'rexUI', plugin: UIPlugin, mapping: 'rexUI' }, // ... ] } // ... }; var game = new Phaser.Game(config);

However, Studio Code/TypeScript still does not recognize the key 'rexUI' so I cannot use intellisense. What could be the issue?

rexrainbow commented 1 year ago

Try this line rexUI: UIPlugin;

Netherzapdos commented 1 year ago

Try this line rexUI: UIPlugin;

Worked, thanks for the fast reply ❤️