Version: 2023.2

Material.RevertPropertyOverride

切换到手册
public void RevertPropertyOverride (string name);
public void RevertPropertyOverride (int nameID);

参数

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

描述

Removes the override on a property.

After the Editor reverts a Property override, it no longer marks that Property as overriden. That Property now inherits its value from the parent. Note that this method is Editor-only.

Additional resources: Material.IsPropertyOverriden, Material.ApplyPropertyOverride.