A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs(minigame): built-in targets are not overridable by design, not by omission
yhh615ea9b08d4d
diff --git a/docs/astro/src/content/docs/guides/minigame-platforms.mdx b/docs/astro/src/content/docs/guides/minigame-platforms.mdxindex 4e209b205..d1786d486 100644--- a/docs/astro/src/content/docs/guides/minigame-platforms.mdx+++ b/docs/astro/src/content/docs/guides/minigame-platforms.mdx@@ -106,13 +106,16 @@ import { wechatProfile } from 'esengine/wechat';export default { ...wechatProfile, createVideoBackend: (ctx) => new SoftwareVideoBackend(ctx) };```-<Aside type="caution">- This replaces a capability of **a platform you install yourself**. The built-in- targets install their own profile on import, so selecting *WeChat* in Package- Project always gets the stock backends — to ship a modified one, define it as a- project platform (below) and select that instead. Spreading `wechatProfile`- also does not carry WeChat's `WXWebAssembly` polyfill, which- `initWeChatPlatform()` installs; call `polyfillWebAssembly()` from+<Aside type="note">+ **Built-in targets are deliberately not overridable.** They install their own+ profile on import, so selecting *WeChat* in Package Project always gets the+ stock backends — a fixed, predictable baseline, and one less way for a build to+ differ from what the engine tests. Replacing a capability is what a project+ platform is for: define one (below), have its `runtimeProfile` spread the host+ profile and override what you want, and select that target instead.++ The spread does not carry WeChat's `WXWebAssembly` polyfill, which+ `initWeChatPlatform()` installs — call `polyfillWebAssembly()` from`esengine/wechat` yourself if you go that route.</Aside>diff --git a/docs/astro/src/content/docs/zh-cn/guides/minigame-platforms.mdx b/docs/astro/src/content/docs/zh-cn/guides/minigame-platforms.mdxindex 6b8c62097..fab8ed0da 100644--- a/docs/astro/src/content/docs/zh-cn/guides/minigame-platforms.mdx+++ b/docs/astro/src/content/docs/zh-cn/guides/minigame-platforms.mdx@@ -98,12 +98,15 @@ import { wechatProfile } from 'esengine/wechat';export default { ...wechatProfile, createVideoBackend: (ctx) => new SoftwareVideoBackend(ctx) };```-<Aside type="caution">- 这替换的是**你自己安装的平台**的能力。内置目标在 import 时就装好了自己的 profile,- 所以在打包对话框里选「微信小游戏」拿到的永远是原装后端——要发布改过的版本,- 请把它定义成一个项目平台(见下)并改选它。另外展开 `wechatProfile` 不会带上- `initWeChatPlatform()` 装的 `WXWebAssembly` polyfill,走这条路要自己调- `esengine/wechat` 的 `polyfillWebAssembly()`。+<Aside type="note">+ **内置目标有意不开放覆盖。** 它们在 import 时就装好了自己的 profile,所以在打包+ 对话框里选「微信小游戏」拿到的永远是原装后端——一个固定、可预期的基线,也少一种+ 「构建结果与引擎测试过的不一致」的可能。替换能力正是**项目平台**的用途:定义一个+ (见下),让它的 `runtimeProfile` 展开宿主 profile 再覆盖你要改的那项,然后改选+ 这个目标。++ 展开时不会带上 `initWeChatPlatform()` 装的 `WXWebAssembly` polyfill,走这条路+ 要自己调 `esengine/wechat` 的 `polyfillWebAssembly()`。</Aside>## 宿主需要提供什么