-
-
Notifications
You must be signed in to change notification settings - Fork 228
Cocos2d‐x migration guide
Dani Alias edited this page Feb 9, 2024
·
17 revisions
If in your Cocos2d-x project you're including engine headers different from cocos2d.h (or axmol.h), it's recommended to follow this steps for quick fixing the header's includes of your project source code:
- Clone https://github.com/axmolengine/axmol-migrate
- Go to folder
axmol-migrate
and runpwsh ./build.ps1 -xb "'--config', 'Release'"
- 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
The command line axmol-migrate.exe
can fix 99% (or 100% for some projects) of your includes. After executing it, you can manually fix any compile error.
The axmol-migrate
can compile on Windows, MacOS and Linux.
- RngSeed => FastRNG UNDER math/FastRNG.h
- Sprite3D => MeshRenderer UNDER 3d/CCMeshRenderer.h
- Sprite3DMaterial => MeshMaterial UNDER 3d/CCMeshMaterial.h
- Director::isDisplayStats() => Director::isStatsDisplay() UNDER base/CCDirector.h