no message

This commit is contained in:
2026-06-18 14:07:38 +08:00
parent d393302388
commit 18990deb2d
12 changed files with 910 additions and 116 deletions

View File

@@ -6,13 +6,21 @@
* StreamingAssets/
* levels-database.json
* levels-database.json.br
* levels-db-index.json
* levels-db-index.json.br
* StreamingAssets/aa/levels-db/
*
* 不含 index.html / TemplateData仅 standalone-player 独立调试页使用)
*/
const fs = require('fs');
const path = require('path');
const RUNTIME_ROOT_FILES = ['levels-database.json', 'levels-database.json.br'];
const RUNTIME_ROOT_FILES = [
'levels-database.json',
'levels-database.json.br',
'levels-db-index.json',
'levels-db-index.json.br',
];
const RUNTIME_DIRS = ['Build', 'StreamingAssets'];
function walkFiles(root, bucket, prefix = '') {
@@ -62,6 +70,9 @@ function assertRuntimePack(packDir, opts) {
if (!fs.existsSync(catalog)) {
throw new Error(`缺少运行时包: ${catalog}`);
}
if (!fs.existsSync(path.join(packDir, 'levels-db-index.json'))) {
throw new Error(`缺少运行时包: ${path.join(packDir, 'levels-db-index.json')}`);
}
if (!fs.existsSync(path.join(packDir, 'levels-database.json'))) {
throw new Error(`缺少运行时包: ${path.join(packDir, 'levels-database.json')}`);
}