201 Commits

Author SHA1 Message Date
hyde zhou 6ccf1cf9a8 Reapply "Feat/plugin support, allow third_party feat(spine) to create plugin f…" (#403) (#424)
This reverts commit 5bcfb9fa04.
2026-11-16 16:33:05 +08:00
hyde zhou 5bcfb9fa04 Revert "Feat/plugin support, allow third_party feat(spine) to create plugin f…" (#403)
This reverts commit a56706c9ad.
2026-11-10 17:04:32 +08:00
Tianze-Chen a56706c9ad Feat/plugin support, allow third_party feat(spine) to create plugin for creator. (#306)
* Add UIMesh component for custom 2D mesh rendering

- Add UIMesh component consuming pre-baked vertex/index/segment data, enabling custom renderers (e.g. spine plugin) to batch through the 2D batcher.
- Export UIMesh from the 2d components index.
- Validate setMeshData input at the boundary (stride, buffer lengths, index values, segment ranges, accessor caps) via engine-standard errorIDs 9010-9017, documented in EngineErrorMap.md.
- Expose StaticVBAccessor per-chunk caps as maxVertexCount/maxIndexCount getters and clamp the 10% reserve to them, so meshes that fit (e.g. 30000 vertices) allocate instead of silently failing.
- Add tests/ui/ui-mesh.test.ts covering the 32767 cap boundary, setMeshData validation, and accessor lifetime.

Also takes over node transform and cascaded opacity: vertices are now always
node-local — UIMesh applies the node's world matrix (unbatched via the
per-draw GPU transform the 2D batcher already maintains for middleware,
batched by baking into the shared chunk copy so draws still merge) and folds
the cascaded UIOpacity into the copied vertex colors itself. The legacy
switches (USE_LOCAL / useLocalData / RenderEntity.setUseLocal) are all derived
internally; consumers never touch them. A JSB staleness poll re-prepares the
native draw infos in the same frame on transform/opacity changes, and a
premultipliedAlpha format declaration drives the opacity fold and the builtin
material's blend factors.

Follow-ups folded in: the opacity fold reads the light color at byte offset 20
(the pos*3f + uv*2f header is 20 bytes), not 16; and UIMesh notifies data
producers through the new onPremultipliedAlphaChanged() hook so subclasses
(e.g. the spine plugin) forward the declared format to their baker instead of
redeclaring the field.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* Disable built-in spine by default; minor editor/build fixes

- Default the built-in Spine feature (spine-3.8) to off in feature cropping, so it is only included when enabled in the editor.
- Recognize scale as a valid spine atlas page attribute in the texture inspector.
- Skip incomplete platform dirs when bundling runtime adapters.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 7f7922aaf42ff1857f0a6d38970a75d303032f57)

* Export WebAssembly interface under cc.wasm namespace

- Add exports/webassembly.ts re-exporting pal/wasm (instantiateWasm, fetchBuffer, fetchUrl, ensureWasmModuleReady) as the public cc.wasm namespace, so extensions/game code can load their own .wasm files through the engine's platform-adaptive path.
- Expose it as a croppable feature rather than an unconditional export from exports/base.ts: cc.config.json declares a `webassembly` feature and editor/engine-features/render-config.json adds the panel entry (default on, required), so it appears under Project Settings -> Feature Cropping. The label/description are plain text on purpose — i18n:ENGINE.* keys live in the editor package and a custom engine cannot add them.

(cherry picked from commit 92003ab4a21b6ee753cf3ba2ca0f4767658e9cdc)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat(simulator): generic native plugin discovery opt-in

The generic plugin discovery chain (cc_gen_plugin_cmake_hook ->
plugins_parser.js -> Pre-AutoLoadPlulgins.cmake -> find_package ->
plugin_registry) already exists and is what native device builds use; the
simulator never invoked it. Wire it in behind an opt-in cache variable, with
no plugin names or plugin logic in the engine — the plugin set is always just
the scan result:

- templates/cmake/common.cmake: cc_gen_plugin_cmake_hook()'s scan roots
  (CC_PLUGIN_PATH) may now be pre-set by the caller; the native-build
  project-layout defaults are unchanged when nobody pre-defines it
- simulator runtime-src CMakeLists.txt: -DSIMULATOR_PLUGIN_SCAN_DIRS="<dir>
  [;<dir>]" scans those roots for cc_plugin.json through the same chain as
  device builds (CC_PROJECT_DIR points into the build tree so the generated
  hook lands there, satisfying the parser's output-dir invariant); unset
  keeps the stock plugin-less simulator, and a cache variable means plain
  `cmake --build` reuses the configured scan
- simulator Game.cpp: call cc_load_all_plugins() after init, mirroring
  BaseGame::init(), so registered plugins' JSB bindings exist before any
  script runs (no-op when no plugins are linked)
- libsimulator protobuf config.h: skip the <hash_map>/<hash_set> defines on
  MSVC >= 1950 (headers removed); stubs fall back to the std::map emulation
  path

Verified end-to-end: a project extensions/ tree scanned at configure time
produces a simulator exe whose plugins register their JSB bindings at startup
(observed live in the simulator's JS context).

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Developer <developer@cocos.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Engineer <engineer@cocos.com>
2026-11-04 16:41:54 +08:00
yangchao 0c3f4534b8 fix: normalize asset root path for source_group on windows (#324) 2026-09-07 21:41:36 +08:00
yangchao 469614cf0b fix ios build problem (#292) 2026-08-23 12:01:54 +08:00
qiuguohua 5690d1b8a5 fix(google-play): set PROP_MIN_SDK_VERSION to 24 (#262)
play-services-oss-licenses, introduced on Feb 2, 2026, requires minSdkVersion 24.
https://developers.google.com/android/guides/releases
2026-08-11 19:35:31 +08:00
yangchao 2c0e75059f xcode > 14.3 apple silicon use arm64 arch for ios simulation。 (#214) 2026-08-02 17:52:06 +08:00
hyde zhou 98917ff2a7 Revert "删除多余的构建模板 (#177)" (#179)
This reverts commit dc29d2f8f8.
2026-07-02 18:06:57 +08:00
tangkai dc29d2f8f8 删除多余的构建模板 (#177) 2026-07-02 11:30:59 +08:00
hyde zhou 4a6f83bd6d Revert "refactor platforms (#126)" (#128) 2026-04-28 23:12:10 +08:00
hyde zhou 910865bd8b refactor platforms (#126) 2026-04-28 18:53:46 +08:00
qiuguohua 5844b19e93 Add gamepad option (#19094) 2025-12-02 10:26:27 +08:00
qiuguohua 80fcb051c2 Integrating Game Controllers with HarmonyOS Next (#19060)
* Integrating Game Controllers with HarmonyOS Next

* update HarmonyOS Next ci

* Fix JSON formatting errors

* update HarmonyOS Next ci

* update HarmonyOS Next ci

* Fix incorrect file casing

* Filter system for non-gamepad events

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2025-11-15 10:30:42 +08:00
bofeng-song 2e4778fede Reapply "Use PROP_ENABLE_COMPRESS_SO to control whether dynamic libraries are compressed in Android build outputs. (#18819)" (#18822) (#18999) 2025-09-09 14:51:28 +08:00
qiuguohua 7a2de2e3a5 Fixing the issue on the HarmonyOS Next platform where the editbox continues to be affected after closing the input keyboard. (#18919) 2025-08-20 21:33:00 +08:00
qiuguohua 03e75984eb HarmonyOS Next platform fixes inability to display font colors and video playback ending and not being able to replay it (#18839) 2025-07-09 16:03:44 +08:00
qiuguohua ba1bb13b19 Fix the problem of incorrect video playback progress (#18825) 2025-07-01 15:57:20 +08:00
qiuguohua 3784029f73 Modify evalString to a thread-safe function (#18823) 2025-06-30 18:48:22 +08:00
hyde zhou 93f8c01d25 Revert "Use PROP_ENABLE_COMPRESS_SO to control whether dynamic libraries are compressed in Android build outputs. (#18819)" (#18822)
This reverts commit dbf3d34dc1.

Revert "387 android 16kb (#18817)"

This reverts commit c79e105ec1.
2025-06-30 17:53:50 +08:00
bofeng-song dbf3d34dc1 Use PROP_ENABLE_COMPRESS_SO to control whether dynamic libraries are compressed in Android build outputs. (#18819) 2025-06-27 18:18:22 +08:00
bofeng-song c79e105ec1 387 android 16kb (#18817) 2025-06-27 16:00:02 +08:00
qiuguohua 9077db261e Fix stopvideo event for HarmonyOS-Next platform. (#18794) 2025-06-18 15:03:31 +08:00
qiuguohua 898edeb064 Synchronize code from creator 2.x to creator 3.x on the HarmonyOS Next platform. (#18757) 2025-06-10 12:03:53 +08:00
qiuguohua 775a2a2256 Refactoring worker-ui communication (#18743) 2025-05-29 15:29:33 +08:00
媛媛 7dc01cbcdf update game.ejs for douyin (#18701) 2025-05-09 10:33:22 +08:00
wanghui187 a1243b4251 Mouse keyboard adaptation for HarmonyOS Next (#18656) 2025-04-29 17:48:07 +08:00
媛媛 7698170722 Update the value of libVersion in wechat template (#18602) 2025-04-14 13:42:00 +08:00
媛媛 8b293f1c9c Support 'separate engine' for douyin minigame (#18585) 2025-04-10 13:51:45 +08:00
媛媛 16555c5f69 update game.esj for douyin engine plugin (#18579) 2025-04-09 16:41:40 +08:00
qiuguohua f80ca2cceb Implementation of google play auto login, achievements, PGS Recall API (#18416) 2025-03-09 23:34:12 +08:00
bofeng-song 7c068a7195 Fix build error while spine is not enabled. (#18418) 2025-03-07 11:39:46 +08:00
James Chen 9052956a80 Revert "Align the Android template project with the official default template…" (#18412)
This reverts commit dfbbf46201.
2025-03-06 09:24:11 +08:00
James Chen a0597b24a4 Update deployment target version of iOS LaunchScreen.storybard to 8.0 (#18409)
Ref: https://github.com/cocos/engine-native/pull/4347
2025-03-05 16:39:27 +08:00
James Chen 0876168e37 Support JSVM API on non-openharmony platforms which will make debugging JSVM API easier. (#18398)
* Support JSVM API on non-openharmony platforms which will make debugging JSVM API easier.

JSVM v8 backend source code is copied from https://gitee.com/openharmony/third_party_node/tree/OpenHarmony-v5.0.2-Release

* CI test JSVM v8 backend.
2025-03-03 16:29:26 +08:00
dream93 dfbbf46201 Align the Android template project with the official default template. (#18151) 2025-02-14 10:47:12 +08:00
qiuguohua a20bb447a0 Fix cross threading issue when calling callStatic Method (#18316)
* Fix cross threading issue when calling callStatic Method

* Rename AsyncCallParam to CallParam

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2025-02-11 16:46:31 +08:00
James Chen 50d86d0c53 Update CI OH SDK to 13 (#18287) 2025-02-07 16:56:34 +08:00
minggo 4c92a439ee Oh egl crash (#18252)
* Fix HarmonyOS Next platform crash

---------

Co-authored-by: qiuguohua <qiuguohua111@126.com>
2025-01-25 11:55:19 +08:00
qiuguohua fd7270c886 Synchronize HarmonyOS Next platform from cocos creator 2.4.14 (#18247)
* Synchronize the HarmonyOS Next platform update for 2.4.14
2025-01-24 13:48:35 +08:00
minggo 61090036aa make the Supported Destinations of iOS project include iPad (#18142)
* make the Supported Destinations of iOS project include iPad
2025-01-09 10:41:15 +08:00
qiuguohua 2e4a9d57e0 Fix the incorrect orientation of the gravity sensor and JSVM crash issue in HarmonyOS Next (#18041)
* 1.Fix the problem of incorrect rotation direction of openharmony screen
2.Remove redundant files

# Conflicts:
#	templates/harmonyos-next/entry/src/main/ets/cocos/jsb-adapter/sys-ability-polyfill.js

* Fix the issue of JSVM running crash

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2024-12-17 10:43:39 +08:00
qiuguohua deba073213 Integrate the Google Play Billing Library into engine (#17918) 2024-11-29 11:18:48 +08:00
qiuguohua 7611668235 Change openharmony to harmonyos-next (#17988)
Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2024-11-29 09:15:33 +08:00
bofeng-song 5e671ae5dc Fix audio load error on TaoBao-MiniGame platform (#17921) 2024-11-26 18:09:15 +08:00
qiuguohua 59e00c9dae V3.8.5 oh api12 (#17869)
* Improvement of openharmony's editbox (#17042)

* Improvement of openharmony's editbox

* Remove redundant header file

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
# Conflicts:
#	templates/openharmony/entry/src/main/cpp/types/libcocos/index.d.ts
#	templates/openharmony/entry/src/main/ets/components/EditBoxDialog.ets
#	templates/openharmony/entry/src/main/ets/pages/index.ets
#	templates/openharmony/entry/src/main/ets/workers/cocos_worker.ts

* Upgrade the openharmony API to 12

* Remove debugging information

* Fix some bugs in the ark engine
Fix some issues with jsvm
* Release module_info

* Fix std::any_of return value not being used

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2024-11-19 09:32:08 +08:00
吴智明 24946a1cf5 add mobile-web-app-capable meta (#17760)
Co-authored-by: zhiming.wu <zhiming.wu@cocos.com>
2024-10-28 16:18:04 +08:00
bofeng-song d5f292c60c Taobao platform supports removing forward declarations of global variables. (#17691) 2024-10-10 14:33:33 +08:00
qiuguohua 52b4d8c18b Modify the display of the slash screen (#17290)
* Modify the display of the slash screen

* Modify default values

* Modify the first screen template for WeChat mini-games

* Using the fitWidth and fitHeight variables

* Fixed ci

* Optimized code

* Modify the adaptation of the splash screen

---------

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
2024-07-23 16:13:57 +08:00
bofeng-song 71c2e314a3 Due to Google Play's minimum version requirement, upgrade the target API to 34 (#17392) 2024-07-19 10:37:01 +08:00
媛媛 2a60c6a96a update application url in openharmony template (#16795) 2024-03-13 17:00:43 +08:00