The newest update to 2.x. Cocos Creator 2.4.10 is available

2.4.10 fixes some recently discovered 2.x related issues, improves the editor’s and engine’s stability, solves some native mobile platform-related problems, and is recommended for all 2.x users. This version does not damage the compatibility of projects and plugins, so please refer to the upgrade instructions of 2.4.7 to update.

We will continue to provide critical bug fixes through 2022, as planned, for the official release of version 3.0. These fixes will be optimized around stability and usability only, so it is no longer recommended for new users or projects to choose 2.4 but to develop with 3.x.

Editor

● Fix an error that occurs when the Timeline editor exits after editing RichText.

● Fix the problem of incorrect storage location of metafile in the secondary folder when exporting resource. (thanks to Finscn).

● Fix the problem that the bundle priority property of folder configuration has the wrong number type.(thanks to Finscn)

● Improved the Python 2.x installation hints required for building native platforms on Mac.

● Fix an issue with the help link in the Editor Properties panel not working.

Engine

● Fix an error reported when polygon components collide in the physics engine.(fix PhysicsPolygonCollider parse error. by xianyinchen · Pull Request #10888 · cocos/cocos-engine · GitHub)

● Fix the problem that internal data is not released after Tween has stopped (release `_finalAction` after stop the tween by finscn · Pull Request #11360 · cocos/cocos-engine · GitHub), thanks to Finscn.

● Fixed the problem that when Label and particle nodes are disabled, the component enable state is wrong after entering the Timeline editor (Fix the render component enabled status is wrong after label and pa… by knoxHuang · Pull Request #12384 · cocos/cocos-engine · GitHub)

● Director.EVENT_BEFORE_UPDATE, Director.EVENT_AFTER_UPDATE, Director.EVENT_AFTER_DRAW events, add deltaTime parameter (pass `deltaTime` to Events of mainLoop by finscn · Pull Request #11359 · cocos/cocos-engine · GitHub), thanks to Finscn

● MotionStreak effect optimization: Fix the trail position when initializing and avoiding trail delay by one frame. (Fix MotionStreak initializing and avoid trail delay by one frame by jareguo · Pull Request #10982 · cocos/cocos-engine · GitHub)

● Improve the definition of some interfaces in creator.d.ts (optimize type for 2.4.10 by PPpro · Pull Request #11981 · cocos/cocos-engine · GitHub)

Native

● Fix the problem of audio acceleration when entering the background (fix audio accelerate when enter to background as v3.5 by timlyeee · Pull Request #4288 · cocos/engine-native · GitHub)

● Fix the crash problem when jumping to ads on the Android platform (cherry pick commit to v2.4.9, fix crash when jump to advertisement by timlyeee · Pull Request #4289 · cocos/engine-native · GitHub)

● Fix the problem of getting the wrong language after the Android 7 version (get language by using system language settings by timlyeee · Pull Request #4290 · cocos/engine-native · GitHub)

● Fix the issue that the native WebSocket call to Close causes the game to crash (refine websocketClose parameters for protection by mmyduckx · Pull Request #4291 · cocos/engine-native · GitHub)

Upgrade Tips

As Cocos Creator 3.0 version has been officially released, v2.4.x will be used as the LTS (long-term support) version, providing continuous updates for the next two years! In 2021, 2.4 will continue to be updated to provide bug fixes and new mini-game platform support to ensure the successful launch of your project; in 2022, we will continue to provide developers with the key to 2.4 Bug fixes to ensure the smooth operation of online games! therefore:

  • Existing 2.x projects can continue to develop without compulsory upgrade to 3.0.
  • For new projects, it is recommended to use version 3.0 for development. We will continue to optimize the development experience and operating efficiency of 3.0 to support the smooth launch of heavy games of different categories such as 2D and 3D.

Upgrading a project from a previous version of Cocos Creator is irreversible. Please backup the old version of the project before upgrading.

Most projects can usually be upgraded automatically, but because the project is inevitably unique, developers should try and evaluate the new version of the engine in advance according to the needs of the project. In addition, due to stability considerations, it is recommended that projects that are about to go online or already online should be carefully upgraded. The following is the upgrade instructions. If developers encounter difficulties during the upgrade, please give us feedback and we will try our best to assist.

Upgrade from <2.4.0 version

  • cc.loader is no longer recommended, please use the latest cc.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 use cc.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 use cc.Color.fromHEX interface

Upgrade from < 2.3.3 version

  • The CCTexture2D and CCTexture2DRGB methods in the Effect have been abandoned.
  • Vec3.FRONT has been abandoned, please use Vec3.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 the app/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 and libs directories under the proj.android-studio root directory, respectively.
  • proj.android-studio under the root directory jni/CocosAndroid.mk, jni/CocosApplication.mk, mainly used to configure engine-related configuration, developer configuration, it is recommended that Android be placed in app/jni/Android.mk and app/jni/Application.mk, Android Instant, please put in game/jni/Android.mk and game/jni/Application.mk.
  • When Cocos Creator compiles for Android, it will execute assembleRelease/Debug by default, and when compiling for Android Instant, it will execute instant: 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 .

Downloads

Dashboard for MacOS

Dashboard for Windows

Download Creator from Dashboard

Cocos Dashboard

The Cocos Dashboard serves as a unified downloader and launch portal for Cocos Creator. 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: