---
title: "Object Pools - s&box library"
description: "Just a regular list based object pool."
canonical: "https://sbox.watch/ru/libraries/hotpot/objectpools/"
generated_at: "2026-10-09T11:31:14.758Z"
---

# Object Pools

Just a regular list based object pool.

- Тип: библиотека
- Идентификатор: hotpot.objectpools
- Автор: hotdawg
- Канонический URL: https://sbox.watch/ru/libraries/hotpot/objectpools/
- Markdown: https://sbox.watch/ru/libraries/hotpot/objectpools/index.md
- sbox.game: https://sbox.game/hotpot/objectpools/
- Создано: 2026-10-09T11:31:14.758Z

## Статистика

- динамика за 24 ч: +0
- Terry Score: --
- Избранное: 0
- Положительные оценки: 0
- Отрицательные оценки: 0
- Обновлено: 11 июн. 2025 г.
- Создано: 11 июн. 2025 г.
- Размер: 3.7 KB
- Файлы: 2
- Теги: object, pool, pooling

## Описание

Example
using ObjectPools;

public sealed class TestObjectPool : Component
{
 \[Property\] private GameObject prefab { get; set; }

 private ObjectPool<GameObject> \_pool;

 protected override void OnStart()
 {
 \_pool = new ObjectPool<GameObject>(
 OnCreate,
 OnGet,
 OnRelease,
 OnDestroy,
 defaultCapacity: 10,
 maxAmount: 10000,
 collectionCheck: true);
 }

 GameObject OnCreate()
 {
 return prefab.Clone();
 }

 void OnGet(GameObject obj)
 {
 obj.Enabled = true;
 }

 void OnRelease(GameObject obj)
 {
 obj.Enabled = false;
 }

 void OnDestroy(GameObject obj)
 {
 obj.Destroy();
 }
}




## More by hotdawg

| Package | Идентификатор | Игроки | Избранное | Положительные оценки | Оценка | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Chit Chat Dialogue System | hotpot.chitchat | 0 | 5 | 4 | 60% | https://sbox.watch/ru/libraries/hotpot/chitchat/index.md |
