Fix UGF resource packaging errors

资源构建失败是因为资源集合中包含了 AssemblyDefinitionAsset,并且 StreamingAssets 文件夹的创建行为间歇性出现。
此更改移除了资源打包输入中的脚本相关条目,并保留了跟踪的 StreamingAssets 支架文件,使得包输出可以重新生成而不会触发元/文件夹不匹配警告。

限制:Unity/UGF 打包不能在 AssetBundles 中包含 AssemblyDefinitionAsset
限制:StreamingAssets 内容应保持被忽略,而文件夹身份仍被追踪
禁止:保留脚本资源并依赖平台标识 | bundle 包包含 Editor-only 对象
可信:高
范围风险:狭窄
可逆性:干净
指令:不要将 .asmdef/.cs 资产添加到 ResourceCollection 中;只有 runtime 资产才能进入 bundle
测试:资源构建器打包运行完成,且没有之前的两个错误
This commit is contained in:
SepComet
2026-05-10 16:30:36 +08:00
parent 0a78c0bd94
commit c6f48951d3
10 changed files with 25 additions and 92 deletions
+5 -5
View File
@@ -3,16 +3,16 @@
<ResourceBuilder>
<Settings>
<InternalResourceVersion>1</InternalResourceVersion>
<Platforms>33</Platforms>
<Platforms>1</Platforms>
<AssetBundleCompression>1</AssetBundleCompression>
<CompressionHelperTypeName>UnityGameFramework.Runtime.DefaultCompressionHelper</CompressionHelperTypeName>
<AdditionalCompressionSelected>False</AdditionalCompressionSelected>
<ForceRebuildAssetBundleSelected>False</ForceRebuildAssetBundleSelected>
<ForceRebuildAssetBundleSelected>True</ForceRebuildAssetBundleSelected>
<BuildEventHandlerTypeName>VampireLike.Editor.VampireLikeBuildEventHandler</BuildEventHandlerTypeName>
<OutputDirectory>C:/UnityProjects/VampireLike/bin/AssetBundles</OutputDirectory>
<OutputDirectory>D:/Learn/GameLearn/UnityProjects/VampireLike/bin/AssetBundles</OutputDirectory>
<OutputPackageSelected>True</OutputPackageSelected>
<OutputFullSelected>False</OutputFullSelected>
<OutputPackedSelected>False</OutputPackedSelected>
<OutputFullSelected>True</OutputFullSelected>
<OutputPackedSelected>True</OutputPackedSelected>
</Settings>
</ResourceBuilder>
</UnityGameFramework>