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