Skip to content

格式

typescript
Material.HasTexture(name)

所属类: Material

描述

检查当前材质是否具有 Texture 属性。

参数

参数名类型描述
namestring属性名称

返回值

类型描述
boolean是否具有 Texture 属性

代码示例

typescript
let material = Resources.Load<Material>(Material, "materialId");
material.HasTexture("_Texture");