在 Unity 3D 中创建资源包后缺少材质和纹理

发布于 2024-12-12 23:51:18 字数 402 浏览 0 评论 0原文

我试图在角色定制项目中使用我的角色资产来代替统一的男性/女性资产。当我通过资源包加载时,我的角色部分可见,只有头发和鞋子可见。生成材料步骤进展顺利。通过更深入地研究项目,我在 CreateAssetbundles.cs 类中发现,

Debug.Log("Saved " + bundleName + " with " + (toinclude.Count - 2) + " materials");

除了鞋子和头发之外的束都采用 0 材料。这表明我没有正确创建捆绑包。我错过了什么步骤吗?材质或资源包生成是否有固定的命名模式?

另外,我正在尝试使用一些玛雅资产,但使用它们我什至无法生成材料。如果我手动生成材料,则资产包不会生成。

此外,我没有找到该示例项目的任何文档。任何帮助将不胜感激。

I was trying to use my character asset in Character customization project in place of the Male/Female asset by unity. When I am loading through asset bundle my character is partly visible, only its hair and shoes are visible. Generating material step went fine. By looking deeper in the project I found out in the class CreateAssetbundles.cs, at line

Debug.Log("Saved " + bundleName + " with " + (toinclude.Count - 2) + " materials");

The bundles other than the shoes and hair are taking 0 materials. This kind of clears that I am not creating the bundles properly. Am I missing any step? Is there is any fixed naming pattern for the material or assetbundle generation?

Also I am trying with some maya assets, with them I am not even able to generate material. And if I manually generate material, then assetbundles are not generating.

Moreover, I am not finding any documentation for this example project. Any help would be highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间☆小暴躁 2024-12-19 23:51:18

构建资源包时,请确保您的脚本使用 BuildAssetBundleOptions.CollectDependency 和 BuildAssetBundleOptions.CompleteAssets 选项。这将导致捆绑包在构建捆绑包时引入所有材质、纹理等。

请参阅 http://unity3d.com/support/documentation/ScriptReference/ BuildPipeline.BuildAssetBundle.html?from=AssetBundle 供参考。

When you build your asset bundle, make sure your script uses the BuildAssetBundleOptions.CollectDependencies and BuildAssetBundleOptions.CompleteAssets options. This will cause the bundle to pull in all materials, textures, etc. when building the bundle.

See http://unity3d.com/support/documentation/ScriptReference/BuildPipeline.BuildAssetBundle.html?from=AssetBundle for reference.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文