Cocos Creator v2.4.4 released, now using Cocos Dashboard!
Cocos Creator v2.4.4 is here! This update brings more new features, optimizes performance and improves stability.
It is recommended for all v2.3.x developers to upgrade! Please perform the necessary technical evaluation and backups before upgrading.
Note: Yes, please use Dashboard now to Download and manage Cocos Creator
Downloads
Download Creator from Dashboard
Cocos Dashboard
The Cocos Dashboard serves as a unified downloader and launch portal for Cocos Creator and Cocos Creator 3D engines. Everyone can upgrade and manage multiple versions of Cocos Creator. In addition, unified project management and a creation panel is integrated, which is convenient for everyone to develop projects with different versions of engines at the same time.
Manage projects developed under different versions:
You can choose to use a different version of Cocos Creator when creating a new project:
What’s new
Cocos Creator 2.4.4 is finally here! The engine team is working hard on the upcoming v3.0 release. The plan is to unify the 2D game and 3D game development process and provide more and more powerful features. In addition, the engine team will continue to maintain and optimize the 2.x version. This version supports the Bytedance game sub-package functions, optimizes the runtime and development process, and fixes 2.4 For related issues since the beginning, 2.x users are welcome to upgrade and experience!
Bytedance Mini Games officially supports sub-package functions, which will provide developers with more room to play, and Creator will also open support for sub-package functions as soon as possible.
Improvements
-
Optimize native ttf font rendering [#2874]
-
The first scene subcontracting and the built-in resource subcontracting merge all JSON by default to improve loading speed
-
Display script information on the MissingScript component, which is convenient for locating the problematic script
-
Update TypeScript version to 4.1.3
-
Native platform
XMLHttpRequest
supportsHEAD
request type [#3093] -
Optimize the consumption of calculating material hash value at runtime, thanks to Xiaopang Dacheng, [#7316]
-
Android build supports gradle 5.x version [#3162]
Engine
-
[ASSET] Fix the problem of inaccurate prefab reference count when running after build
-
[ASSET] Fixed the problem that the input parameter
maxRetryCount
is invalid when loading resources [#7689] -
[ASSET] Fix the problem of invalid preloaded pictures[#7581]
-
[ASSET] Fix the problem that component scripts may be lost during runtime when the Prefab in the sub-package is reused by the main package [#8001]
-
[PARTICLE] Fix the error of the accuracy of the particle system color change, thanks to caogtaa, [#7532]
-
[PARTICLE] Fixed the issue that the rendering texture was not refreshed when the particle component replaced the plist file, [#6994]
-
[TILEDMAP] Fixed the problem of incorrect transparency of Tiledmap[#7898]
-
[TILEDMAP] Fixed the problem of rendering inactive nodes of Tiledmap[#7898]
-
[SPRITE] Fixed an issue where Sprite displays incorrectly after checking
Allow Rotation
in the automatic gallery [#7501] -
[SPRITE] Fix the problem that Sprite does not support
flipX
andflipY
in Mesh mode [#7407] -
[LABEL] Fixed the problem that black blocks will appear when the Label component uses BMFont to switch
active
[#7492] -
[PHYSICS] Fixed the problem that the non-rigid body node will not follow the parent node when there are both rigid body node and non-rigid body node under the node. /7455)
-
[MASK] Fix the problem of adding the Mask component before adding the node to the node tree. [#7429]
-
[GRAPHICS] Fixed the problem of spurs in the drawing process of Graphics component, [#7780]
-
[ANIMATION] Fixed the problem that setting
sample
andsetCurrentTime
is invalid when the animation is not playing [#7943]
Native
-
Fix the problem that the native platform cannot continue drawing after a certain number of Graphics vertices are drawn [#2884]
-
Fix the problem that the node
size
does not change when modifying the Label text [#2834] -
Fixed an issue where selecting
Ignore Blank Images
when Spine exported the atlas resulted in failure to parse the .skel binary file [#2813] -
Fix the problem that the mixed parameters of the native platform do not take effect [#7839]
-
Fix the problem that the native platform
rayMesh
always returns infinity [#7795] -
Fix the problem that Sprite uses Mesh mode rendering error on native platform [#362]
-
Fix the problem of abnormal rendering of the 3d node Mask component of the native platform [#358]
Mini Game
-
Fixed the problem that the plugin script in the editor plugin failed to load on the mini game platform
-
Fixed the problem that the Label disappeared after some models of WeChat platform switched back from the background [#215]
-
Fix the problem that the game gets stuck after answering the phone during WeChat mini game game [#219]
Web
-
Fix the problem of performance degradation of the web platform on Safari 14 [#8192]
-
Fix the problem that uppercase letters are displayed when inputting lowercase letters in the password type input box of the Web platform [#7793]
Editor
-
Fixed an error when automatically synchronized pre-made associated root nodes
-
Fix the problem that the editor does not respond when importing wrong JSON files
-
Fixed the problem that the saving of nested prefab would be invalid after deleting the child nodes
-
Fix the problem that the node cannot change the level after searching for uuid on the level manager
-
Fix the problem that the
MD5Cache
option is invalid when building a native platform from the command line -
Fix the problem of engine sourcemap error during preview [#7609]
-
Fix the problem that the curve of editing animation will be invalid
-
Fix the problem that the json files of SpriteFrame on the native platform cannot be merged
-
Fix the problem that the child nodes cannot be saved when the Prefab resource is set to sync mode
-
Fix the problem that the hash value of the file after construction changes
-
Fixed an issue where texture and FBX did not export dependent textures when using the export function
-
Fix the problem that webp files cannot be packaged when building Xiaomi
Upgrade Tips
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 <2.4.0 version
-
cc.loader
is no longer recommended, please use the latestcc.assetManager
instead, please refer to the Resource Management Module Upgrade Guide -
The sub-package function has been upgraded to Asset Bundle, please refer to the Resource Subcontract Upgrade Guide
-
Adjusted the directory structure after the project is built and adjusted the API of
BuildResults
. If you use the editor plug-in to get the editor’s build results, please refer to Customized Project Build Process Upgrade Guide -
The
cc.RawAsset
that was deprecated since 1.10 has been officially removed, please usecc.Asset
instead. Since 2.4 is no longer compatible with the legacy usage of the RawAsset type in the original 1.x project, it is recommended that all projects to be upgraded to 2.4, especially those upgraded from version 1.9, be edited in any 1.10 ~ 2.3 version. All warnings or errors output when the compiler compiles the code are processed correctly, and then upgraded to 2.4. -
cc.Color.fromHex
is deprecated, please usecc.Color.fromHEX
interface
Upgrade from < 2.3.3 version
-
The
CCTexture2D
andCCTexture2DRGB
methods in the Effect have been abandoned. -
Vec3.FRONT
has been abandoned, please useVec3.FORWARD
instead.
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/src
directory, and the third-party library used by itself, please put it in theapp/libs
directory. -
If the code and third-party libraries used by Android Instant are separate, please put them in the
game/src
,game/libs
directories. -
For code and third-party libraries shared by Android and Android Instant, please place them in the
src
andlibs
directories under theproj.android-studio
root directory, respectively. -
proj.android-studio
under the root directoryjni/CocosAndroid.mk
,jni/CocosApplication.mk
, mainly used to configure engine-related configuration, developer configuration, it is recommended that Android be placed inapp/jni/Android.mk
andapp/jni/Application.mk
, Android Instant, please put ingame/jni/Android.mk
andgame/jni/Application.mk
. -
When Cocos Creator compiles for Android, it will execute
assembleRelease/Debug
by default, and when compiling for Android Instant, it will executeinstant: assembleRelease/Debug
.
In addition, when Cocos Creator compiles for Android, it will execute assembleRelease/Debug
by default, and when compiling Android Instant, it will execute in stant:assembleRelease/Debug
.
If you have customized the pause logic when switching between audio background and background, please remove it after upgrading to 2.3.0 Currently Cocos Creator games automatically pause and resume audio internally when switching between front and back on all platforms. If the developer has customized this block before, and listens for and performs audio operations like cc.audioEngine.pause()
and resume()
, it may conflict with the engine’s default behavior. If you encounter related audio issues, simply remove the corresponding custom code.
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.Node
which 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.
// Assuming testNode is a node in the scene, if it was manually
// removed from the scene before, such as
testNode.parent = null;
// or
testNode.removeFromParent(true);
// or
parentNode.removeChild(testNode);
// If testNode will be used again in the future, there is no need to
// manually destroy the node otherwise it should be called manually
testNode.destroy();
- If a node is managed via
cc.NodePool
, it is not affected.
Upgrade from < v2.0
If you open the 1.x project, all resources such as scenes will be upgraded automatically. If there are warnings or errors in the code, you can refer to v1.10.0 Resource Upgrade Guide and the v2.0.0 Upgrade Documentation.