Materials are used in conjunction with Mesh or Particle Renderers attached to the GameObject. They play an essential part in defining how your object is displayed. Materials include a reference to the Shader used to render the Mesh or Particles, so these Components can not be displayed without some kind of Material.
The properties of any Material will change depending on the selected Shader. These are the most often used properties:
Shader | The Shader that will be used by the Material. For more information, read the Built-in Shader Guide. |
Main Color | Any kind of color tint can be applied. Use white for no tint. |
Base | The Texture that will be displayed. |
Materials are used to place Textures onto your GameObjects. You cannot add a Texture directly without a Material, and doing so will implicitly create a new Material. The proper workflow is to create a Material, select a Shader, and choose the Texture asset(s) to display along with it. For more information on Materials, take a look at the Manual's page about Materials.
After you create your material, the first thing you should decide is which Shader to use. You choose it from the drop-down Shader menu.
The Shader drop-down menu
You can choose any Shader that exists in your project's assets folder or one of the built-in Shaders. You can also create your own Shaders. For more information on using the built-in Shaders, view the Built-in Shader Guide. For information on writing your own shaders, take a look at the Shaders section of the Manual and ShaderLab Reference.
Depending on the type of shader selected, a number of different properties can appear in the Inspector.
The different types of Shader properties are:
Color pickers | Used to choose colors. |
Sliders | Used to tweak a number value across the allowed range. |
Textures | Used to select textures. |
The placement of the textures can be altered by changing the Offset and Tiling properties.
Offset | Slides the Texture around. |
Tiling | Tiles the Texture along the different axes. |
Page last updated: 2010-07-13