# BasedOnTextureName_Or_ModelNameAndMaterialName

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

## Definition

* **Type:** Field
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

> **Warning:**
>
> **Deprecated.** You should use ModelImporterMaterialName.BasedOnTextureName instead, because it it less complicated and behaves in more consistent way.

```csharp
BasedOnTextureName_Or_ModelNameAndMaterialName = 3
```

### Remarks

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](/engine/6000.0/script-reference/unityeditor/modelimportergeneratematerials/pertexture.md)). Additional Resources: [ModelImporter.materialName](/engine/6000.0/script-reference/unityeditor/modelimporter/materialname.md).
