} /// <summary> /// Использовать для возвращения в пул /// </summary> public void ReturnToPool() { if (InPool) return; if (CurrentPool != null) { PrepareReturnToPool(); InPool = true; CurrentPool.ReturnObject(this); } else { Destroy(this.gameObject); return; } if (OnToPoolReturned != null) OnToPoolReturned(); OnToPoolReturned = null;