Cocos Creator 2.4.7 released!

Cocos Creator 2.4.7 is released

To do their job well, a worker must first sharpen their tools. After a long period of preparation and testing, version 2.4.7 is finally released. Thank you to all the friends who gave us valuable feedback! In this update, we have concentrated on fixing some 2.x-related issues that we have discovered recently, focusing on improving the stability of the editor, and we recommend that all 2.x users upgrade.

According to the plan when the 3.0 version was officially released on February 7 of this year, 2.4 as the LTS version will continue to provide bug fixes this year. At the same time next year, we will continue to pay attention to 2.4 key issues and major platform adaptation issues, and update the version from time to time to support the safe operation of online projects.

Once again, to answer questions about the 3.x upgrade:

  • New projects are no longer recommended based on 2.4, please use the 3.x version for development, we will continue to optimize the 3.x development experience, pay attention to the package and efficiency of lightweight games, and support 2D, 3D and other different types of game development.

  • If the current 2.x project has reached the mid-development stage or is about to go online, there is no need to upgrade to 3.x.

  • If the current 2.x project is still in the early stages of development, you can evaluate whether you need to upgrade to 3.x. If you are sure to upgrade, you can use the 2.x resource import tool provided by Creator. This tool will support the perfect import of old project resources and the auxiliary import of codes. Code-assisted import will convert js into ts, add component type declarations, attribute declarations and function declarations. The references of components in the scene will be preserved, and the code inside the function will be imported in the form of comments, which can reduce the developer’s upgrade Difficulty. For detailed upgrade instructions, please refer to Upgrade Guide. If developers encounter difficulties during the upgrade, please feel free to give us feedback and we will try our best to assist.

Stack Changes

  • Upgrade the Electron version of the editor to 13.1.4. It solves the problem of WebGL crash that frequently occurs for some users on Windows, and also supports the native ARM instruction set of M1 (Apple Silicon). It is recommended that all M1 users upgrade to obtain better performance. Affected by the Electron update, a small number of editor plug-ins may be affected. Please refer to the upgrade instructions for details.

  • Upgrade the Gradle version of the Android project to version 4.2.2. See the upgrade instructions for details.

Editor

  • Fix the problem that the scene data may be overwritten by clicking Save when Prefab is opened

  • Fixed the problem that the memory will continue to grow if there is no scene switching operation when refreshing the script in the editor, thanks to isilent

  • Fixed the problem that MD5 of some files may be changed after repeated construction

  • Fix Some third-party plug-in ui-section headers in ui-section in 2.4.5 are incompatible with the syntax of the class registration

  • Adjust the resource compression operation during the build to after copying the build template and the beforeFinish event.

  • Fix the problem that if you modify the script after the build and bind the node and then build again, the bound content may be empty during runtime

  • Fixed the problem of the wrong node selection on the keyboard up and down after searching in the explorer

  • Fix the problem that dragging the panel after selecting all audio-clip, sprite-frame, and texture in the explorer will report a resize error

  • Fix the problem that the selected node cannot be deleted after the scene is focused

  • Fixed the problem that the automatic synchronization pop-up window status of the prefab could not be saved

  • Fix the problem that using undo and resetting node attributes is invalid after the color and other attributes on the node are changed

  • Fixed the problem of errors when opening the editor when there are parentheses in the resource path or project path

  • Fix the problem that clicking on the hyperlink in Markdown is invalid

  • Fix the problem that the data changes after Prefab is not modified and saved

Engine

  • Fix the problem of pre-loading pictures that did not download the auto atlas

  • Fix the problem that the transparency cascade calculation of the node is incorrect after modifying the parent node [#9322]

  • Fixed the problem that the Scroll View did not trigger the event correctly when it reached the horizontal and vertical boundaries at the same time. Thanks to zty8023ys [#9445]

  • Fix the problem that the Mask component is invalid when adjusting the node size at runtime [#9444]

  • Fix the redrawing problem of Graphics Bezier curve, thanks caogtaa [#9194]

  • Fix EditBox in PhoneNumber mode, the mouse wheel causes the number to be negative, thanks wanghaha1991 [#9138]

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:

1 Like