Version: 2019.4
LanguageEnglish
  • C#
Method group is Obsolete

ModelImporterMaterialName.BasedOnTextureName_Or_ModelNameAndMaterialName

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Obsolete You should use ModelImporterMaterialName.BasedOnTextureName instead, because it it less complicated and behaves in more consistent way.

Description

<textureName>.mat or <modelFileName>-<materialName>.mat material name.

Name materials <textureName>.mat (i.e. diffuse texture name of imported material) when searching for existing or creating new materials. If material doesn't have a texture or texture doesn't exist in Unity project folder in one of Textures folders, then material will be named <modelFileName>-<materialName>.mat instead. This option has behaviour compatible with Unity 3.4 and earlier versions (i.e. same behaviour as ModelImporterGenerateMaterials.PerTexture). See Also: ModelImporter.materialName.