Version: 2020.1
Using materials with C# scripts

Material Inspector 参考

当您在 Unity 项目中选择材质资源时,可以使用 Inspector 窗口对其进行查看和编辑。有关材质的一般信息,请参阅材质简介



控件 功能
Settings 单击 Inspector 右上角的齿轮图标打开材质的 Settings 菜单并访问以下选项:
Select Shader Selects the Unity shader in the Project view.
Edit Shader Opens the source file for the Unity shader in your default external text editor.
Create Material Preset 在项目中的相同位置创建材质的副本。
Copy Material Properties 将材质的属性复制到剪贴板。
Paste Material Properties 如果剪贴板包含材质属性,Unity 会将它们粘贴到此材质中。否则,它没有任何作用。
Copy Atlas 如果材质是 Text Mesh Pro 材质,Unity 会将字体图集复制到剪贴板。否则,它没有任何作用。
Paste Atlas 如果材质是 Text Mesh Pro 材质并且剪贴板包含 Text Mesh Pro 字体图集,Unity 会将其粘贴到此材质中。否则,它没有任何作用。
Reset Reset all material properties to the default values defined in the Unity shader.
Shader Use this drop-down menu to assign a Unity shader to this material.

Unity shaders are organised according to their name. For more information on assigning a name to a Unity shader in ShaderLab code, see ShaderLab: assigning a name to a Unity shader.


The properties that the Unity Editor displays for a material depend on the Unity shader that the material uses. This section of the Inspector window can look very different depending on the Unity shader.

对于 Unity 内置着色器中定义的材质属性,请参阅以下页面:

属性 功能
[Material properties, based on the Unity shader] The properties for the currently selected Unity shader.

For more information, see Assigning Material properties to a Unity shader.
Render Queue By default, materials use the render queue defined in their Unity shader. Use this drop-down menu to override this if required. For more information on render queues, see ShaderLab: SubShader Tags.

Corresponds to the Material.renderQueue property.
Double Sided Global Illumination When enabled, the Progressive Lightmapper accounts for both sides of the geometry when calculating Global Illumination. This means that back-facing polygons bounce light using the same emission and albedo as front facing polygons. Note that Unity this does not mean that Unity renders back facing polygons, or adds them to lightmaps.

Corresponds to the Material.doubleSidedGI property.
Using materials with C# scripts
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。