Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Terrain.materialType

Switch to Manual
public var materialType: Terrain.MaterialType;

Description

The type of the material used to render the terrain. Could be one of the built-in types or custom. See MaterialType.

If you want to use a custom material, set this to Terrain.MaterialType.Custom, then assign a material to Terrain.materialTemplate. Terrain.MaterialType.Custom with Terrain.materialTemplate == null is identical to Terrain.MaterialType.BuiltInLegacyDiffuse.