Version: 2022.1

Material.IsPropertyOverriden

切换到手册
public bool IsPropertyOverriden (string name);
public bool IsPropertyOverriden (int nameID);

参数

nameID 属性名称 ID,使用 Shader.PropertyToID 获取。
name 属性名称,例如“_SrcBlend”。

返回

bool Returns true if the property you pass in is overriden by this material. Otherwise, returns false.

描述

Checks whether a property is overriden by this material.

This method is Editor-only.

See Also: Material.ApplyPropertyOverride, Material.RevertPropertyOverride.