Should preserve the properties when cloning material.
parent
579330f269
commit
f7741dc7ee
|
@ -73,6 +73,7 @@ namespace Coffee.UIExtensions
|
|||
if (_softMask)
|
||||
{
|
||||
result = new Material(baseMaterial);
|
||||
result.CopyPropertiesFromMaterial(baseMaterial);
|
||||
result.hideFlags = HideFlags.HideAndDontSave;
|
||||
result.SetTexture(s_SoftMaskTexId, _softMask.softMaskBuffer);
|
||||
result.SetInt(s_StencilCompId, m_UseStencil ? (int)CompareFunction.Equal : (int)CompareFunction.Always);
|
||||
|
@ -326,4 +327,4 @@ namespace Coffee.UIExtensions
|
|||
#pragma warning restore 0612
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue