Skip to content

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.

fix(assets): three import settings that were a component field's second copy

esenginec43f4434f724
diff --git a/desktop/tests/asset-importer.test.ts b/desktop/tests/asset-importer.test.ts
index 4779d8165..fd1a2377e 100644
--- a/desktop/tests/asset-importer.test.ts
+++ b/desktop/tests/asset-importer.test.ts
@@ -28,7 +28,7 @@ describe('importerDefaults (import-time .meta)', () => {
});
});
it('is empty for a type with no import settings, and for an unknown one', () => {
- expect(importerDefaults('spine')).toEqual({ scale: 1, defaultSkin: 'default' });
+ expect(importerDefaults('spine')).toEqual({ scale: 1 });
expect(importerDefaults('audio')).toEqual({ compress: true, bitrateKbps: 128 });
// A scene is authored, not imported: it has metadata and no settings.
expect(importerDefaults('scene')).toEqual({});
diff --git a/pipeline/src/project/importSettings.ts b/pipeline/src/project/importSettings.ts
index aa6304fb1..230f016a1 100644
--- a/pipeline/src/project/importSettings.ts
+++ b/pipeline/src/project/importSettings.ts
@@ -90,22 +90,12 @@ const TEXTURE: ImporterFieldSpec[] = [
const SPINE: ImporterFieldSpec[] = [
{ key: 'scale', label: 'Scale', type: 'number', default: 1, min: 0, step: 0.01, category: 'Spine' },
- { key: 'defaultSkin', label: 'Default Skin', type: 'string', default: 'default', category: 'Spine' },
];
-// A DragonBones file is a project: it can hold several armatures, so which one an
-// entity gets is an import-time default rather than something derived from the
-// file. Spine needs no equivalent — its file IS one skeleton.
+// Which armature and animation an entity gets are DragonBonesAnimation fields
+// (empty = the file's first / its setup pose), so import carries only the scale.
const DRAGONBONES: ImporterFieldSpec[] = [
{ key: 'scale', label: 'Scale', type: 'number', default: 1, min: 0, step: 0.01, category: 'DragonBones' },
- {
- key: 'defaultArmature', label: 'Default Armature', type: 'string', default: '', category: 'DragonBones',
- tooltip: 'Armature used when an entity does not name one. Empty picks the first in the file.',
- },
- {
- key: 'defaultAnimation', label: 'Default Animation', type: 'string', default: '', category: 'DragonBones',
- tooltip: 'Played on spawn. Empty leaves the armature in its setup pose.',
- },
];
const AUDIO: ImporterFieldSpec[] = [
diff --git a/tools/check-import-settings.mjs b/tools/check-import-settings.mjs
index b00b76a3e..59c7435b1 100644
--- a/tools/check-import-settings.mjs
+++ b/tools/check-import-settings.mjs
@@ -26,11 +26,7 @@ const SPECS = path.join('pipeline', 'src', 'project', 'importSettings.ts');
* Settings with no reader because the feature behind them is not built. Each
* entry says what is missing, so the list reads as work rather than permission.
*/
-const DECLARED_GAPS = {
- 'spine.defaultSkin': 'nothing applies it when a SpineAnimation is created from the asset',
- 'dragonbones.defaultArmature': 'nothing applies it when a DragonBonesAnimation is created',
- 'dragonbones.defaultAnimation': 'nothing applies it when a DragonBonesAnimation is created',
-};
+const DECLARED_GAPS = {};
const source = readFileSync(path.join(ROOT, SPECS), 'utf8');