After a long period of development and preparation, and after a memorable Spring Festival, Cocos Creator v2.3 is officially released. v2.3 is a very important version that officially integrates support for 3D physics, collisions, and 3D particles, and is capable of developing more types of 3D games! At the same time, the material system has been upgraded from the experimental version to the official version, which can greatly improve the expressiveness of a game. It is recommended that all developers upgrade! Please perform the necessary technical evaluation and backups before upgrading.
Support publishing to Qutoutiao (QTT) mini games
Cocos Creator v2.3 officially supports publishing to a brand new platform: Qutoutiao Mini Games. For detailed steps on platform access, please refer to Publish to Qutoutiao Mini Games.
Support 3D physics system
Like Cocos Creator 3D, Creator’s physics engine is based on cannon.js and provides users with an efficient, componentized workflow with convenient usage methods. Currently, supported functionality is: rigid body, Box/Sphere collision components, trigger and collision events, physical materials, ray detection and many other features.
For detailed information, please refer to the Physics 3D documentation.
Supports 3D collision system
Like Cocos Creator 3D, Creator provides a lightweight collision detection system called Builtin. Builtin is a physics module with only a collision detection system. Compared to other physics engines, it does not have complicated physics simulation calculations, which will make the game’s package smaller and provide better performance.
For detailed information, please refer to the Physics Select documentation.
Support 3D particle system
The implementation of 3D particles is basically the same as Cocos Creator 3D. It is powerful and supports debugging in the editor.
There are currently dozens of modules to choose from, including Shape, Color, Velocity, Size, Sequence Frame, Trailing, and so on.
Currently provided are a variety of parameter settings such as: Constant, Curve, Two Constant, Two Curve, Gradient, etc.
For detailed information, please refer to the Particle System 3D documentation.
Upgrade the material system to the official version
Creator’s material system was originally added in v2.1.1, but has been marked as an experimental feature in the editor and lacked relevant documentation. After a few iterations, it has upgraded to the official version! This version of the Effect compilation syntax is consistent with Cocos Creator 3D. It can be written using VS Code’s Cocos Effect plugin, but the built-in shader variable names are slightly different. Developers who have customized materials in the previous version of Creator can try to upgrade to the official version according to the documentation. If you encounter difficulties, you can post on the forum for help. The features of the new version of the material system are as follows:
- Support real-time preview of modified results in the scene when modifying materials.
- Supports material variants and effect variants, making it more friendly to 2D games.
- Supports multiple techniques.
- Supports setting Technique, Pass, Property names.
Support Spine and DragonBones mount nodes
When playing skeletal animations, developers often need to mount nodes on a certain part of the skeletal animation to achieve the effect of linking the node with the animation. In Creator v2.3, only a single, very simple operation is needed to mount any node to the bone animation. The node will follow the animation and transform it to achieve the effect of the hanging point. You can also add collision components to the node to achieve collision detection!
For detailed information, please refer to the Spine documentation.
Support Spine binary resource format
In Cocos Creator v2.3, the Spine runtime was upgraded to v3.8. v3.8 supports the
skel binary format for importing from Spine. The usage of the
skel format is the same as the original
JSON format, but the file is smaller and loads faster!
Only recompile scripts when building
In the build panel, if you have successfully built the project before, you can check Build script only for the second build. The checked build will reuse the engine and resources that were built last time, and only recompile the scripts, which will greatly facilitate debugging! This is a very popular feature in the community, thank you very much for suggesting it.
Scene Editor adds 3D viewing options
Other Important Features
- Property inspector supports multi-select batch setting of resources
- Support switching single and multi-touch, use
cc.macro.ENABLE_MULTI_TOUCHmacro for setting [#5847]
- Label component supports bold, italic, and underline settings when using
- Added the vertical alignment property align and offset property offset of
<img>in RichText, see the RichText documentation (Thanks RazgrizHsu [#6017]
- Optimize node performance when setting
- Reduce the package size of WeChat, Baidu, Xiaomi, and Alipay mini game platforms by 100KB
- Removed the minimum size limit of dynamic photos, and minimized DrawCall [#5944]
- Optimize the performance of loading images natively (thanks wbenlong) # 2035
- Load subpackage API
loadSubpackagesupports incoming progress callback [#15]
- RichText supports setting the cache mode of Label, which can reduce DrawCall and optimize performance
- Optimized performance of Label when OverFlow is set to SHRINK [#5914]
- Toggle Modify the
isCheckedstate by script. 2.3 New projects will not trigger events, and old projects will not change their behavior.
- Support Spine part map splitting, enhanced dressing function [#5711]
- Engine code supports writing in TypeScript
- Optimize private cache mode for bone animation [#6133]
- Fixed shadow rendering error of 3D objects [#5940]
- Fixed the problem that it is impossible to force logout of all listening events when node is destroyed (thanks to ssyyhm) [#5985]
cc.game.oncefiring multiple times [#6055]
- Fixed the problem of incorrect node matrix after calling
- Fixed Label unable to dynamically batch when using BMFont [#5860]
- Fix the problem of low performance when Label node Overflow is NONE, using Widget component at the same time [#5908]
- Fix RichText memory leak when using stroke
- Fixed the problem of TiledMap surface rendering error caused by texture compression [#5999]
- FixTiledMap incorrect calculation of bounding box when map is asymmetric shape [#5916]
- Fix the problem that API
getPositionAtreturn value of TiledMap is incorrect [#5880]
- Fix Mask penetration problem of click event when nesting [#5749]
- Fix ScrollView wrong rotation direction detection after rotation [#6102]
- Fixed scrolling ScrollView cannot trigger
- Fix PageView fast second drag when the border is exceeded, which will cause the page to jump disorderly [#6015]
- Fix PageView Indicator display error [#6123]
- Fixed the problem that the particle system image was stretched to a square [#5897]
- Fixed the problem of particle file parsing
- Fix the problem that Graphic points drawn in the middle coincide with the starting point, the points drawn later will close automatically (thanks to chocolate) [#6002]
- Fix WheelJoint component setting frequency error report [#6000]
- Fixed the problem of incorrect calculation of orthoHeight when Align With Screen of Camera was false [#6139]
- Fix VideoPlayer Invalid local aspect ratio when displaying local video [#6138]
- Fixed the problem that frequent creation of 3D models caused crashes [#2056]
- Fix the problem that there is no callback after the image fails to load [#2077]
- Fixed the problem of using local cache when loading remote audio with the same name [#219]
- Fixed the issue that Spine, DragonBones, and particles fail in batches after switching parent nodes [#1993]
- Fixed camera rendering error for multiple
- Fix Spine
setAttachmentinterface is invalid [#1992]
- Fix EditBox input emoji crash [#2021]
- Fixed TiledMap rendering abnormally during dynamic loading [#229]
- Fixed the issue that the text layout of the iOS platform and the Mac platform are inconsistent with the web [#1960]
- Fixed the problem that iOS does not pause the game when double-clicking the home button [#1947]
- Fixed iOS crashing background when switching glContext from background [#2083]
- Fix the issue that files are not updated during Android Instant build [#2067]
- Fixed WebSocket crash on Android 64 models [#2074]
- Fix the problem that VideoPlayer cannot play when the scene is delayed loading [#72]
- Fix EditBox’s length is invalid when it is set to negative value [#60]
- Fixed the issue that the audio is not responding when loading on WeChat [#52]
- Fixed the problem of rendering errors using cartoon materials on WeChat [#6008]
- Fixed the problem that the hidden video is not paused when playing the WeChat mini-game VideoPlayer
- Fix issue with
languageCodeundefined on vivo platform
- Fix the problem that the widget does not adapt correctly after the browser automatically rotates [#6061]
- Fixed the problem that the finger cannot be zoomed with UC browser full screen [#5863]
- Fixed the problem that VideoPlayer was in the wrong position after exiting full screen on IE browser
- Fix the problem that QQ browser gets wrong mouse position [#5604]
- Fix the problem of wrong touch event after scrolling in Safari [#5907]
- Fix the problem that Safari displays the wrong navigation bar [#5926]
- Scene editor supports focus node with
- Added backspace shortcut for animation editor to delete animation frames
- Improve node multi-select batch setting, add multi-select add component function
- Fixed an animation error when the animation editor switches nodes with the same name
- Fixed the problem that the preview panel could not be displayed when switching to the game preview panel under animation editing
- Fixed the problem of calculating the center point of the rectangle change tool
- Fixed the problem that the resolution property of Canvas is not updated immediately in the scene
- Fixed the issue that the Canvas wireframe of the scene editor would be blocked by other nodes
- Fixed the problem that the node cannot be switched using the keyboard
- Fixed an issue where the animation editor displayed incorrectly when switching to a node without an animation component
- Fixed an issue where Color Picker could not save color presets
- Fixed the issue that the simulator resolution does not switch after running after switching projects
- Fixed issue where build failed using command line
- Fixed the problem that the native platform cannot build the audio module
- Fixed the problem that the build fails when there is no texture in the auto atlas
- Fixed build failure after copying project
- Fix the effect that the name of the Effect file is wrong when it starts with a number
- Fixed the issue of splash screen when switching editors
- Fixed TypeScript import failure
- Fixed the problem that the editor cannot be opened when the editor is installed on the Chinese path
- Fixed the problem of failed import model
- Fixed the problem that failed to build a new certificate for Xiaomi game on Windows
- Fixed the problem that nodes cannot be dragged after adding collision body components
- Fix the picture distortion caused by pvrtc-4bits-rgb-seprate-a when the texture has only three channels
- Fix ShowFPS button status not saved during webpage preview
cc.Mat4.translatemethod no longer supports rotation transformation, only pure displacement transformation is supported. If you need to support rotation, please use
node_modulesdirectly is not available in v2.3.0 temporarily. It will be fixed in the next version. It is currently recommended that external libraries be compiled separately and imported using the Plugin Scripts.
- Starting with v2.2.0, we no longer recommend using the Skew feature of nodes. Skew is usually used to simulate 3D effects in the 2D engine. With Cocos Creator’s deep support for 3D nodes, the Skew effect can be completely realized by 3D nodes. Inorder to unify the user experience and further optimize the underlying implementation of the engine, we discarded the Skew attribute. However, we will still maintain backward compatibility for a period of time, developers can continue the original practice in the old project. In the future, we will further improve the compatibility method and upgrade cases, and officially choose to remove the Skew function.
Upgrading a project from a previous version of Cocos Creator is irreversible. Please backup the old version of the project before upgrading.
Projects under development can usually be upgraded seamlessly, but because of the uniqueness of each project, developers should conduct a technical evaluation based on their project’s own needs. If developers encounter difficulties in upgrading, please feel free to give us feedback and we will try our best to assist. In addition, due to stability considerations, it is recommended that projects that are about to be launched or already launched be upgraded with caution.
- Upgrade from < v2.3.0 version
Since v2.3.0, Android and Android Instant use the same build template, please note:
- If the code is used solely by the Android platform, please put it in the
app/srcdirectory, and the third-party library used by itself, please put it in the
- If the code and third-party libraries used by Android Instant are separate, please put them in the
- For code and third-party libraries shared by Android and Android Instant, please place them in the
libsdirectories under the
proj.android-studioroot directory, respectively.
proj.android-studiounder the root directory
jni/CocosApplication.mk, mainly used to configure engine-related configuration, developer configuration, it is recommended that Android be placed in
app/jni/Application.mk, Android Instant Please put in game
/jni/Application.mk. When Cocos Creator compiles Android, it will execute
assembleRelease/Debugby default, and when compiling Android Instant, it will execute
- If the code is used solely by the Android platform, please put it in the
- Upgrade from version v2.0 - v2.3.0
Starting from 2.3.0, the Canvas component is no longer responsible for setting the Canvas node size to the screen size. This behavior will be implemented in conjunction with the Widget component. To ensure compatibility, after the 2.0 project is upgraded, the node where Canvas is located will automatically add Widget components. (No problem upgrading from a 1.0 project)
- Upgrade from < v2.2.0
Starting from 2.2.0, we have strengthened the memory management mechanism, and now require users to dynamically create
cc.Nodewhich is independent of the scene node tree through code must be released through
destroy(), otherwise the engine cannot know when to recycle this type The memory of the node will cause a memory leak.In addition, the nodes that are manually removed from the scene need to be unified when they are not needed. If a node is managed via
NodePool, it is not affected.
// Assuming testNode is a node in the scene, if it was manually removed from the scene before, such as
testNode.parent = null;
// If testNode will be used again in the future, there is no need to manually destroy the node
// otherwise it should be called manually