可以使用此选项卡更改 Unity 在导入模型时处理材质和纹理的方式。
当 Unity 导入没有指定任何材质的模型时,它使用 Unity 漫反射材质。如果模型有材质,Unity 会将这些材质导入为子资源。可以使用 Extract Textures 按钮将嵌入式纹理提取到项目中。
属性 | 功能 | |
---|---|---|
Import Materials | 为导入材质启用其余设置。 | |
Location | 定义如何访问材质和纹理。根据选择的这些选项,可以使用不同的属性。 | |
Use Embedded Materials | 选择此选项可将导入的材质保持在导入的资源中。从 Unity 2017.2 版本开始,这是默认选项。 | |
Use External Materials (Legacy) | 选择此选项可将导入的材质提取为外部资源。这是旧版的材质处理方式,适用于使用 Unity 2017.1 或早期版本创建的项目。 |
从 Location 选项中选择 Use Embedded Materials 时,将显示以下导入选项:
属性 | 功能 | |
---|---|---|
纹理 (Textures) | 单击 Extract Textures 按钮可提取导入的资源中嵌入的纹理。如果没有需要提取的纹理,此按钮显示为灰色。 | |
Materials | 单击 Extract Materials 按钮可提取导入的资源中嵌入的材质。如果没有需要提取的材质,此按钮显示为灰色。 | |
Remapped Materials | ||
On Demand Remap | 如果将 Location 设为 Use External Materials (Legacy),这些设置与检视面板中显示的设置相匹配。 | |
Naming | 定义 Unity 对材质的命名方式。 | |
By Base Texture Name | 使用导入材质的漫射纹理名称来命名材质。未将漫射纹理分配给材质的情况下,Unity 将使用导入材质的名称。 | |
From Model’s Material | 使用导入材质的名称来命名材质。 | |
Model Name + Model’s Material | 使用模型文件的名称与导入材质的名称相结合来命名材质。 | |
Search | 定义 Unity 尝试使用 Naming 选项定义的名称查找现有材质的位置。 | |
Local Materials Folder | 仅在“本地”Materials 文件夹(即与模型文件同名的 Materials 子文件夹)中查找现有材质。 | |
Recursive-Up | 在所有父文件夹(一直向上追溯到 Assets 文件夹)中的所有 Materials 子文件夹中查找现有材质。 | |
Project-Wide | 在所有 Unity 项目文件夹中查找现有材质。 | |
Search and Remap | 单击此按钮可使用与旧版导入选项相同的设置将导入的材质重新映射到现有材质资源。单击此按钮不会从资源中提取材质,如果 Unity 无法找到具有正确名称的任何材质,此操作不会更改任何内容。 | |
List of imported materials | 此列表将显示在资源中找到的所有导入材质。可以将每个材质重新映射到项目中的现有材质资源。 |
如果要修改 Unity 中的材质的属性,可使用 Extract Materials 按钮一次性全部提取这些材质。如果要逐个提取材质,请选择 Assets > Extract From Prefab。通过这种方式提取材质时,材质将在 Remapped Materials 列表中显示为引用。
新导入操作或对原始资源的更改不会影响提取的材质。如果要从源资源重新导入材质,必须删除 Remapped Materials 列表中对提取的材质的引用。要从该列表中删除某一项,请选择该项,然后按键盘上的 Backspace 键。
从 Location 选项中选择 Use External Materials (Legacy) 时,将显示以下导入选项:
属性 | 功能 | |
---|---|---|
Naming | 定义 Unity 对材质的命名方式。 | |
By Base Texture Name | 使用导入材质的漫射纹理名称来命名材质。未将漫射纹理分配给材质的情况下,Unity 将使用导入材质的名称。 | |
From Model’s Material | 使用导入材质的名称来命名材质。 | |
Model Name + Model’s Material | 使用模型文件的名称与导入材质的名称相结合来命名材质。 | |
Search | 定义 Unity 尝试使用 Naming 选项定义的名称查找现有材质的位置。 | |
Local Materials Folder | 仅在“本地”Materials 文件夹(即与模型文件同名的 Materials 子文件夹)中查找现有材质。 | |
Recursive-Up | 在所有父文件夹(一直向上追溯到 Assets 文件夹)中的所有 Materials 子文件夹中查找现有材质。 | |
Project-Wide | 在所有 Unity 项目文件夹中查找现有材质。 |
在 Unity 2017.2 版之前,这是默认的材质处理方式。
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.