예제 #1
0
 public void DeletePooledObjects()
 {
     lock (this) {
         for (int i = m_objectPool.Count - 1; i >= 0; i--)
         {
             PooledObject po = m_objectPool[i];
             m_objectPool.RemoveAt(i);
             var c = po.ClearObject() as Component;
             if (c == null)
             {
                 continue;
             }
             Object.Destroy(c.gameObject);
         }
     }
 }