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
fix(native): every App factory installs the optional subsystems from the registry
esenginefc5a68864131
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 231c01ceb..fdebb1262 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -22,6 +22,8 @@ published separately; it ships inside the editor.### Fixed+- **A packaged native game gets the subsystems its project uses.** Every optional subsystem reaches an App through one registry, and the native factory read none of it — it named Spine and DragonBones by hand and stopped there. So a game on a phone ran with no navigation, no tilemaps and no replication while the same game worked on the web: `enemy-ai` threw on a null nav surface, `celestial-heights` refused its own tilemap data, and `multiplayer-arena` threw on a null net role. Found by booting all 52 examples on an emulator.+- **Nothing claims a model cannot see when nobody has said so.** Attaching a picture to a model whose sight is unconfirmed said "this endpoint does not accept images", and the turn itself told the agent it "cannot carry images" — both of which read as the vendor having answered. They now say what is true of the turn: no image is being sent. The attachment notice keeps the two apart, because a vendor saying no is a reason to pick another model and nobody having said is a reason to go and find out.- **A model that can see is no longer told it cannot.** Whether a screenshot could reach the agent was one answer per provider, and DeepSeek publishes a Flash that takes images beside a Pro its vision guide does not name — so the one boolean was wrong about one of them, and wrong the quiet way: the model that can see was told to read `screenshot`'s coarse text grid instead of looking at the picture. It is resolved per model now, in three states, because "the vendor says no" and "nobody has said" are different answers and only the second is worth going to find out about. `deepseek-flash` is the recommended name and the retired `deepseek-v4-flash` still resolves, since the vendor still serves it.diff --git a/sdk/src/ecs/bridge/nativeRuntime.ts b/sdk/src/ecs/bridge/nativeRuntime.tsindex 68749eded..dface82e3 100644--- a/sdk/src/ecs/bridge/nativeRuntime.ts+++ b/sdk/src/ecs/bridge/nativeRuntime.ts@@ -16,7 +16,8 @@ import { inputPlugin } from '../../input/input';import { prefabsPlugin } from '../../prefab/prefabServer';import { sceneManagerPlugin } from '../../scene/scenePlugin';import { headlessBasePlugins } from '../../runtime/webAppFactory';-import { presentationBasePlugins } from '../../app/pluginSets';+import { presentationBasePlugins, inBuildOrder } from '../../app/pluginSets';+import { entryPlugins } from '../../runtime/entryPlugins';import { ensureBuiltinComponentsRegistered } from '../component';import { installNativePlatform, type NativeBridge } from '../../platform/native';import { createNativeRegistry } from './nativeRegistry';@@ -43,8 +44,6 @@ import { ScreenLayout } from '../../ui/core/screen-layout';import { ScreenOverlay, defaultScreenOverlay } from '../../ui/core/screen-overlay';import { DEFAULT_UI_CAMERA_INFO } from '../../app/corePlugin';import { uiPlugin } from '../../ui/ui-plugin';-import { SpinePlugin } from '../../spine';-import { DragonBonesPlugin } from '../../dragonbones';import { setNativeTextSubmit } from '../../ui/text/submit';import { initResourceManager } from '../../wasm/resourceManager';import { Assets as AssetsClass } from '../../asset/Assets';@@ -153,14 +152,10 @@ export function createNativeApp(// reached the core as `app.wasmModule`. They go through `engineApi(app)` now, and// each one reports a core that compiles its subsystem out.installNativeCoreApis(app);- app.addPlugins(presentationBasePlugins());- // Spine, like on the web, is a fresh plugin instance per App (it holds a- // SpineManager keyed to this app's core) and builds its runtime backends from- // `app.sideModules` — which on a device is the runtime compiled into the binary.- app.addPlugin(new SpinePlugin());- // Same shape for DragonBones — its runtime is linked into the host binary- // (estella_dragonbones), which is what `app.sideModules` hands back here.- app.addPlugin(new DragonBonesPlugin());+ // Ordered with the base set, exactly as the web factory does it: every+ // optional subsystem reaches an App through `entryPlugins`, and a factory+ // that names a couple of them by hand ships a device the rest never reach.+ app.addPlugins(inBuildOrder([...presentationBasePlugins(), ...entryPlugins()]));return app;}diff --git a/sdk/tests/entry-installs-optionals.test.ts b/sdk/tests/entry-installs-optionals.test.tsindex 2335d0be4..1e7a936fc 100644--- a/sdk/tests/entry-installs-optionals.test.ts+++ b/sdk/tests/entry-installs-optionals.test.ts@@ -4,6 +4,8 @@// Removing Spine support left all 560 test files green, and the failure is// silent: the scene loads and Spine entities simply never animate.import { describe, it, expect } from 'vitest';+import { readFileSync } from 'node:fs';+import path from 'node:path';import { spineSupport, dragonBonesSupport } from '../src/runtime/sceneOptionals';import '../src/index';@@ -42,3 +44,27 @@ describe('an SDK entry installs the optional subsystems', () => {expect(shared).toEqual([]);});});++/**+ * …and every App an entry builds gets them, not just the web one. A factory that+ * reads no registry ships a device without whatever is only in it — and these+ * tests would not notice, because they only ask what was REGISTERED.+ */+describe('the App factories consume that registry', () => {+ const factory = (file: string): string =>+ readFileSync(path.resolve(__dirname, '..', 'src', file), 'utf8');++ it('is read by the native factory as well as the web one', () => {+ for (const f of ['runtime/webAppFactory.ts', 'ecs/bridge/nativeRuntime.ts']) {+ expect(factory(f), `${f} builds an App without entryPlugins()`).toContain('entryPlugins()');+ }+ });++ // Naming one by hand is how the registry stopped being the only answer.+ it('leaves no optional subsystem named by hand in the native factory', () => {+ const src = factory('ecs/bridge/nativeRuntime.ts');+ const named = ['SpinePlugin', 'DragonBonesPlugin', 'NavPlugin', 'TilemapPlugin', 'NetPlugin']+ .filter((n) => new RegExp(`new ${n}\\(`).test(src));+ expect(named, 'these reach an App through entryPlugins now').toEqual([]);+ });+});diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 0bd8a8740..d91c989c3 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -704,6 +704,8 @@ export const NOTED = {{ note: "The build says what the start screen's logo costs the page." },'feat(agent): a person can record which models their account has seen take an image':{ note: 'You can tell the editor which models your account has seen take an image.' },+ 'fix(native): every App factory installs the optional subsystems from the registry':+ { note: 'A packaged native game gets the subsystems its project uses.' },'fix(agent): nothing claims a model cannot see when nobody has said so':{ note: 'Nothing claims a model cannot see when nobody has said so.' },'fix(agent): what a model can see is resolved per model, in three states':