Skip to content

Cocos2d‐x migration guide

Dani Alias edited this page Jan 13, 2024 · 17 revisions

Migration guide

If you are include engine headers not only cocos2d.h/axmol.h, then you should read this guide for quick fix your header includes of your project sources.

  1. clone https://github.com/axmolengine/axmol-migrate
  2. Goto folder axmol-migrate and run pwsh ./build.ps1 -xb "'--config', 'Release'"
  3. use axmol-migrate to migrate your project sources folder ./build_x64/bin/Release/axmol-migrate source --fuzzy --source-dir path/to/your/project/sources/folder

Notes

The command line axmol-migrate.exe can fix 99% or 100% for some project (i.e. OpenGD: ) of your includes, after execute it, you can manually fix compile error of you project. The axmol-migrate can compile on windows, macos, linux

Renamed Types

Classes & Structs

  • RngSeed => FastRNG UNDER math/FastRNG.h
  • Sprite3D => MeshRenderer UNDER 3d/CCMeshRenderer.h
  • Sprite3DMaterial => MeshMaterial UNDER 3d/CCMeshMaterial.h
  • Functions & Methods
  • Director::isDisplayStats() => Director::isStatsDisplay() UNDER base/CCDirector.h
Clone this wiki locally