当 Unity 导入没有指定任何材质的 SpeedTree 模型时,它使用 Unity 漫反射材质。如果模型有材质,Unity 会将这些材质导入为子资源。可以使用 Materials 选项卡更改 Unity 在导入 SpeedTree 模型时处理材质的方式。
Materials 选项卡包含以下部分:
(A) Location 和 Materials 设置可用于控制 Unity 是否导入或提取导入资源中的材质。
(B) Remapped Materials 设置可用于将导入的材质重新映射到项目中的现有材质,或者提取导入的材质并在选择的位置创建单独的资源。
(C) 预览面板显示 SpeedTree 模型及其材质。
Location 属性定义 SpeedTree 资源访问其材质的方式。SpeedTree Materials 选项卡上的其余属性会根据所选的这些选项而变化。
值 | 描述 |
---|---|
Use Embedded Materials | 如果选择此选项,Unity 会将导入的材质保持在资源中。可以选择性地将导入的材质重新映射到项目中的现有材质。 这是默认值和建议值。 |
Use External Materials (Legacy) | 表示此资源是使用以前版本的 Unity 导入的。如果选择此选项,Unity 会自动提取材质并将它们放在与模型相同位置的 Materials 文件夹中。 |
单击 Extract Materials 按钮可提取导入的资源中嵌入的材质。如果没有需要提取的材质,此按钮显示为灰色。
如果导入以默认纹理为法线贴图的材质,则会显示以下消息:
由于纹理导入器设置出现在另一个 Inspector 窗口中,Unity 提供了执行此修复的选项:
此部分显示映射到此 SpeedTree 资源的每个 LOD 级别的材质列表。
如果已经有一组要用于此资源的材质,请展开 On Demand Remap 组,然后单击 Search and Remap 按钮。
重新映射任何材质后,单击 Regenerate Materials 按钮以使用最新的导入设置重新导入外部材质。
警告:重新导入外部材质会删除先前对材质文件所做的所有手动修改。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.