Access to the WeChat PC Mini Games
WeChat PC mini game is support to open WeChat Mini Game in the WeChat PC Client. The WeChat PC mini game will have most of the capabilities of Mobile, 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.
Starting with Cocos Creator v2.3.1, creating games for the WeChat PC Mini Games is officially supported. And completes the adaptation of mouse and keyboard related interfaces.
Use Cocos Creator to access to WeChat PC mini games with one click.
Download and install the latest version of WeChat PC Client and log in to it with the WeChat account bound to the WeChat DevTools.
Development permissions, WeChat team has now opened the relevant permissions for all WeChat IDs that bound the development permissions in the mini game background. Newly bound WeChat ID, can be debugged the next day.
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 Settings -> General Settings button in the menu bar, and then check the Launch PC for auto preview.
Click the Preview button in the WeChat DevTools, select the Automatic Remote Debug tab and click Compile and Remote Debug to preview and debug the mini game on the WeChat PC Client.
Q: How to distinguish the Mobile and PC of WeChat through the engine interface?
A: You can determine by
cc.sys.isMobile that the PC side returns
false and the mobile side returns
Note: The simulator on the WeChat DevTools simulates the environment on the mobile, so this returns
Q: Does the WeChat PC mini game support Mac?
A: Not yet supported. By 2020-03-09, WeChat PC mini game is in the open beta phase, and it only supports Windows currently. Later on, we will actively cooperate with the engineers of WeChat PC mini game to adapt the Mac system at the first time.