You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
fix: fix cached position for pre-warmed particles
This commit is contained in:
@@ -395,7 +395,6 @@ namespace Coffee.UIExtensions
|
||||
#if !SERIALIZE_FIELD_MASKABLE
|
||||
maskable = m_Maskable;
|
||||
#endif
|
||||
_cachedPosition = transform.position;
|
||||
activeMeshIndices.Clear();
|
||||
|
||||
UIParticleUpdater.Register(this);
|
||||
|
||||
@@ -154,6 +154,9 @@ namespace Coffee.UIExtensions
|
||||
|
||||
particle.cachedPosition = position;
|
||||
|
||||
if (particle.activeMeshIndices.CountFast() == 0)
|
||||
diff = Vector3.zero;
|
||||
|
||||
for (var i = 0; i < particle.particles.Count; i++)
|
||||
{
|
||||
Profiler.BeginSample("[UIParticle] Bake Mesh > Push index");
|
||||
|
||||
Reference in New Issue
Block a user