parent
08c4aba8ab
commit
2ec81da048
|
@ -245,12 +245,7 @@ namespace Coffee.UIExtensions
|
||||||
if (count == 0 || !isActiveAndEnabled || particles.Count == 0)
|
if (count == 0 || !isActiveAndEnabled || particles.Count == 0)
|
||||||
{
|
{
|
||||||
canvasRenderer.Clear();
|
canvasRenderer.Clear();
|
||||||
|
ClearPreviousMaterials();
|
||||||
foreach (var m in s_PrevMaskMaterials)
|
|
||||||
StencilMaterial.Remove(m);
|
|
||||||
|
|
||||||
foreach (var m in s_PrevModifiedMaterials)
|
|
||||||
ModifiedMaterial.Remove(m);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,11 +288,18 @@ namespace Coffee.UIExtensions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClearPreviousMaterials();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearPreviousMaterials()
|
||||||
|
{
|
||||||
foreach (var m in s_PrevMaskMaterials)
|
foreach (var m in s_PrevMaskMaterials)
|
||||||
StencilMaterial.Remove(m);
|
StencilMaterial.Remove(m);
|
||||||
|
s_PrevMaskMaterials.Clear();
|
||||||
|
|
||||||
foreach (var m in s_PrevModifiedMaterials)
|
foreach (var m in s_PrevModifiedMaterials)
|
||||||
ModifiedMaterial.Remove(m);
|
ModifiedMaterial.Remove(m);
|
||||||
|
s_PrevModifiedMaterials.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Material GetModifiedMaterial(Material baseMaterial, Texture2D texture)
|
private Material GetModifiedMaterial(Material baseMaterial, Texture2D texture)
|
||||||
|
|
Loading…
Reference in New Issue