Access to WeChat PC Mini Games
Note: some platforms only have Chinese documentation available when visiting the platform's website. It may be necessary to use Google Translate in-order to review the documentation.
WeChat PC Mini Game supports running WeChat mini games in WeChat for PC. The WeChat PC Mini Game will have most of the Mobile capabilities, including but not limited to virtual payment, open data context, touch events, etc. (ads are not currently supported). It also provides keyboard events, mouse events, window customization and other features.
Cocos Creator supports publishing games to WeChat PC Mini Games, and completes the adaptation of mouse and keyboard related interfaces. Let's see how to publish the game to WeChat PC Mini Games by Cocos Creator.
Use Cocos Creator to Access to WeChat PC Mini Games
Download and install the latest version of WeChat for PC and login to it with the WeChat account bound to the WeChat DevTools.
Process of Publishing
Refer to the process of Publish to WeChat Mini Games and publish the game project to the WeChat Mini Game.
In the WeChat DevTools, click the Preview button in the upper toolbar, select the Automatic Preview tab, check the Launch PC for auto preview option, and then click the Compile and Remote Debug button to preview and debug the mini game on the WeChat for PC.
Q: How to distinguish the Mobile and PC of WeChat through the engine interface?
A: You can determine by
sys.isMobile that the PC side returns
false and the mobile side returns
Note: the simulator on the WeChat DevTools simulates a environment on the mobile, so it returns
Q: Does the WeChat PC Mini Game support Mac?
A: Yes. WeChat PC Mini Game already support Mac. The publishing process is the same as above.