Fix error
parent
566b479a37
commit
95202546bb
|
@ -143,7 +143,7 @@ namespace Coffee.UIExtensions
|
|||
foreach (UIParticle uip in _particles)
|
||||
{
|
||||
ParticleSystem ps = uip.cachedParticleSystem;
|
||||
if (!ps)
|
||||
if (!ps || !uip.canvas)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -242,11 +242,11 @@ namespace Coffee.UIExtensions
|
|||
/// </summary>
|
||||
static void UpdateMeshes ()
|
||||
{
|
||||
foreach (var uip in s_ActiveParticles)
|
||||
for (int i = 0; i < s_ActiveParticles.Count; i++)
|
||||
{
|
||||
if(uip)
|
||||
if (s_ActiveParticles [i])
|
||||
{
|
||||
uip.UpdateMesh ();
|
||||
s_ActiveParticles [i].UpdateMesh ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue