You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
feat: support IMeshModifier
Custom vertex effects and CompositeCanvasRenderer are supported close #282
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Coffee.UIExtensions
|
|||||||
[AddComponentMenu("")]
|
[AddComponentMenu("")]
|
||||||
internal class UIParticleRenderer : MaskableGraphic
|
internal class UIParticleRenderer : MaskableGraphic
|
||||||
{
|
{
|
||||||
|
private static readonly List<Component> s_Components = new List<Component>();
|
||||||
private static readonly CombineInstance[] s_CombineInstances = { new CombineInstance() };
|
private static readonly CombineInstance[] s_CombineInstances = { new CombineInstance() };
|
||||||
private static readonly List<Material> s_Materials = new List<Material>(2);
|
private static readonly List<Material> s_Materials = new List<Material>(2);
|
||||||
private static MaterialPropertyBlock s_Mpb;
|
private static MaterialPropertyBlock s_Mpb;
|
||||||
@@ -401,6 +402,14 @@ namespace Coffee.UIExtensions
|
|||||||
workerMesh.SetColors(s_Colors);
|
workerMesh.SetColors(s_Colors);
|
||||||
Profiler.EndSample();
|
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();
|
Profiler.EndSample();
|
||||||
|
|||||||
Reference in New Issue
Block a user