diff --git a/Scripts/UIParticleRenderer.cs b/Scripts/UIParticleRenderer.cs index 36f8659..ef8f3a9 100644 --- a/Scripts/UIParticleRenderer.cs +++ b/Scripts/UIParticleRenderer.cs @@ -14,6 +14,7 @@ namespace Coffee.UIExtensions [AddComponentMenu("")] internal class UIParticleRenderer : MaskableGraphic { + private static readonly List s_Components = new List(); private static readonly CombineInstance[] s_CombineInstances = { new CombineInstance() }; private static readonly List s_Materials = new List(2); private static MaterialPropertyBlock s_Mpb; @@ -401,6 +402,14 @@ public void UpdateMesh(Camera bakeCamera) workerMesh.SetColors(s_Colors); Profiler.EndSample(); } + + GetComponents(typeof(IMeshModifier), s_Components); + for (var i = 0; i < s_Components.Count; i++) + { + ((IMeshModifier)s_Components[i]).ModifyMesh(workerMesh); + } + + s_Components.Clear(); } Profiler.EndSample();