Skip to content

Commit 8ef71e2

Browse files
authored
Merge pull request #823 from liuxinyumocn/docs/assetDes
Docs/asset des
2 parents 0782ddb + bb0e561 commit 8ef71e2

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed

.config/.vitepress/config.mts

+1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export default defineConfig({
147147
items: [
148148
{ text: "开发错误调试与排查", link: "/Design/DebugAndException" },
149149
{ text: "现网错误日志上报与排查", link: "/Design/IssueForProduction" },
150+
{ text: "MiniGameConfig.asset 说明", link: "/Design/AssetDescription" },
150151
],
151152
},
152153
{

Design/AssetDescription.md

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# MiniGameConfig.asset 配置文件说明
2+
3+
位于 `Assets/WX-WASM-SDK-V2/Editor/MiniGameConfig.asset` 即为 WXSDK 的导出配置文件,其中部分配置可在微信小游戏导出面板中可视化配置,本节将对配置文件中各项字段进行说明,开发者可直接修改其配置内容。
4+
5+
## Project Config
6+
7+
| 字段 | 类型 | 说明 |
8+
| --- | --- | --- |
9+
| projectName | string | 项目名称。 |
10+
| Appid | string | 微信小游戏Appid,前往 https://mp.weixin.qq.com/ 注册获得。 |
11+
| CDN | string | 游戏CDN前缀。 |
12+
| assetLoadType | int | 首资源包加载方式,0: CDN加载;1: 小游戏包内加载。 |
13+
| compressDataPackage | bool | 将首包资源Brotli压缩, 降低资源大小. 注意: 首次启动耗时可能会增加200ms, 仅推荐使用小游戏分包加载时节省包体大小使用。 |
14+
| VideoUrl | string | 加载阶段视频URL,可缺省。 |
15+
| DST | string | 导出路径。 |
16+
| StreamCDN | string | 已废弃。 |
17+
| bundleHashLength | int | 自定义Bundle文件名中hash部分长度,默认值32,用于缓存控制。 |
18+
| bundlePathIdentifier | string | 路径中包含特定标识符开始下载bundle,将被自动缓存。半角分号分隔。 |
19+
| bundleExcludeExtensions | string | 排除路径下指定类型文件不缓存。半角分号分隔。 |
20+
| AssetsUrl | string | 已废弃。 |
21+
| MemorySize: 256 | int | 游戏内存大小(MB)。 |
22+
| HideAfterCallMain | bool | callmain完成后是否立即隐藏加载封面。 |
23+
| preloadFiles | string | 预下载列表。半角分号分隔。 |
24+
| Orientation | int | 设备方向,0:Portrait; 1:Landscape; 2:LandscapeLeft; 3:LandscapeRight|
25+
| bgImageSrc | string | 启动背景图。 |
26+
| dataFileSubPrefix | string | 拼接在DATA_CDN和首包资源文件名的路径,用于首包资源没放到DATA_CDN根目录的情况。 |
27+
| maxStorage | int | 最大缓存容量,单位MB,设置后若接近容量阈值将自动回收。 |
28+
| defaultReleaseSize | int | 清理缓存时默认额外清理的大小,单位Bytes,默认值30MB。 |
29+
| texturesHashLength | int | 微信压缩纹理工具处理的尾部hash长度,用于识别缓存。 |
30+
| texturesPath | string | 微信压缩纹理工具处理的纹理CDN拼接路径。 |
31+
| needCacheTextures | bool | 是否缓存微信压缩纹理工具处理的贴图资源。 |
32+
| loadingBarWidth | int | 加载进度条的宽度,默认240。 |
33+
| needCheckUpdate | bool | 是否需要启动时自动检查小游戏是否有新版本。 |
34+
| disableHighPerformanceFallback | bool | 是否禁止开启高性能模式后在不支持的iOS设备上回退为普通模式,注意:不要随意修改,只有开通高性能模式后并确认不回退才修改。 |
35+
| IOSDevicePixelRatio | float | IOS限制固定的分辨率,以减少内存,但是会降低游戏画面品质。 |
36+
37+
## SDKOptions:
38+
39+
| 字段 | 类型 | 说明 |
40+
| --- | --- | --- |
41+
| UseFriendRelation | bool | 是否使用好友关系链。 |
42+
| UseCompressedTexture | bool | 已废弃。 |
43+
| UseMiniGameChat | bool | 是否使用社交组件。 |
44+
| PreloadWXFont | bool | 是否使用预载系统字体。 |
45+
46+
## CompileOptions:
47+
48+
| 字段 | 类型 | 说明 |
49+
| --- | --- | --- |
50+
| DevelopBuild | bool | Development Build. |
51+
| AutoProfile | bool | Autoconnect Profiler. |
52+
| ScriptOnly | bool | Scripts Only Build. |
53+
| Il2CppOptimizeSize | bool | 对应于Il2CppCodeGeneration选项,勾选时使用OptimizeSize(默认推荐),生成代码小15%左右,取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed,在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)。 |
54+
| profilingFuncs | bool | Profiling Funcs. |
55+
| Webgl2 | bool | WebGL2.0 |
56+
| fbslim | bool | 导出时自动清理UnityEditor默认打包但游戏项目从未使用的资源,瘦身首包资源体积。(团结引擎已无需开启该能力)。 |
57+
| DeleteStreamingAssets | bool | Clear Streaming Assets. |
58+
| ProfilingMemory | bool | Profiling Memory. |
59+
| CleanBuild | bool | Clean WebGL Build. |
60+
| CustomNodePath | string | 已废弃。 |
61+
| showMonitorSuggestModal | bool | 是否显示最佳实践检测弹框。 |
62+
| enableProfileStats | bool | 是否显示性能面板。 |
63+
| enableRenderAnalysis | bool | 是否显示渲染分析日志(develop build才生效)。 |
64+
| iOSAutoGCInterval | int | iOS高性能模式自动GC间隔(毫秒)。 |
65+
| enableIOSPerformancePlus | bool | 是否使用iOS高性能Plus。 |
66+
| brotliMT: 1 | bool | 是否使用brotli多线程压缩 |
67+
68+
## CompressTexture:
69+
70+
以下是微信压缩纹理工具涉及配置,如未使用微信压缩纹理工具可以不予设置。
71+
72+
| 字段 | 类型 | 说明 |
73+
| --- | --- | --- |
74+
| halfSize | bool | 已废弃。|
75+
| useDXT5 | bool | 是否开启PC压缩纹理。 |
76+
| bundleSuffix | string | 已废弃。|
77+
| parallelWithBundle | int | 已废弃。 |
78+
| bundleDir | string | 自定义AB包目录路径。 |
79+
| dstMinDir | string | 压缩纹理产物输出目录。 |
80+
| debugMode | bool | 是否开启仅ASTC模式。 |
81+
| force | bool | 是否强制重新执行。 |
82+
83+
84+
## PlayerPrefsKeys:
85+
86+
使用PlayerPref接口时传入的key,此处设置将预先加载。
87+
88+
## FontOptions:
89+
90+
字体相关配置。
91+
92+
| 字段 | 类型 | 说明 |
93+
| --- | --- | --- |
94+
|CJK_Unified_Ideographs | bool | - |
95+
|C0_Controls_and_Basic_Latin | bool | - |
96+
|CJK_Symbols_and_Punctuation | bool | - |
97+
|General_Punctuation | bool | - |
98+
|Enclosed_CJK_Letters_and_Months | bool | - |
99+
|Vertical_Forms | bool | - |
100+
|CJK_Compatibility_Forms | bool | - |
101+
|Miscellaneous_Symbols | bool | - |
102+
|CJK_Compatibility | bool | - |
103+
|Halfwidth_and_Fullwidth_Forms | bool | - |
104+
|Dingbats | bool | - |
105+
|Letterlike_Symbols | bool | - |
106+
|Enclosed_Alphanumerics | bool | - |
107+
|Number_Forms | bool | - |
108+
|Currency_Symbols | bool | - |
109+
|Arrows | bool | - |
110+
|Geometric_Shapes | bool | - |
111+
|Mathematical_Operators | bool | - |
112+
|CustomUnicode | bool | - |

0 commit comments

Comments
 (0)