Fix error

pull/77/head
mob-sakai 2019-01-15 21:59:27 +09:00
parent 566b479a37
commit 95202546bb
2 changed files with 4 additions and 4 deletions

View File

@ -143,7 +143,7 @@ namespace Coffee.UIExtensions
foreach (UIParticle uip in _particles)
{
ParticleSystem ps = uip.cachedParticleSystem;
if (!ps)
if (!ps || !uip.canvas)
{
continue;
}

View File

@ -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 ();
}
}
}