fix: fix cached position for pre-warmed particles
parent
b93e0e4701
commit
e3f42d747a
|
@ -395,7 +395,6 @@ namespace Coffee.UIExtensions
|
||||||
#if !SERIALIZE_FIELD_MASKABLE
|
#if !SERIALIZE_FIELD_MASKABLE
|
||||||
maskable = m_Maskable;
|
maskable = m_Maskable;
|
||||||
#endif
|
#endif
|
||||||
_cachedPosition = transform.position;
|
|
||||||
activeMeshIndices.Clear();
|
activeMeshIndices.Clear();
|
||||||
|
|
||||||
UIParticleUpdater.Register(this);
|
UIParticleUpdater.Register(this);
|
||||||
|
|
|
@ -154,6 +154,9 @@ namespace Coffee.UIExtensions
|
||||||
|
|
||||||
particle.cachedPosition = position;
|
particle.cachedPosition = position;
|
||||||
|
|
||||||
|
if (particle.activeMeshIndices.CountFast() == 0)
|
||||||
|
diff = Vector3.zero;
|
||||||
|
|
||||||
for (var i = 0; i < particle.particles.Count; i++)
|
for (var i = 0; i < particle.particles.Count; i++)
|
||||||
{
|
{
|
||||||
Profiler.BeginSample("[UIParticle] Bake Mesh > Push index");
|
Profiler.BeginSample("[UIParticle] Bake Mesh > Push index");
|
||||||
|
|
Loading…
Reference in New Issue