public static void RemoveObject(EnemyBase e) { if (instance) { if (instance.ActivePool.Contains(e)) instance.ActivePool.Remove(e); if (!instance.InActivePool.Contains(e)) instance.InActivePool.Add(e); if (e) { e.transform.position = new Vector3(0, 500, -50); e.RemoveFromView(false); } if (instance.onRemove != null) instance.onRemove(e); } }