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

# Object Pools

Just a regular list based object pool.

- Type: bibliothèque
- Identifiant: hotpot.objectpools
- Créateur: hotdawg
- URL canonique: https://sbox.watch/fr/libraries/hotpot/objectpools/
- Markdown: https://sbox.watch/fr/libraries/hotpot/objectpools/index.md
- sbox.game: https://sbox.game/hotpot/objectpools/
- Généré: 2026-10-09T10:45:14.988Z

## Statistiques

- dynamique sur 24 h: +0
- Terry Score: --
- Favoris: 0
- Votes positifs: 0
- Votes négatifs: 0
- Mis à jour: 11 juin 2025
- Créé: 11 juin 2025
- Taille: 3.7 KB
- Fichiers: 2
- Tags: object, pool, pooling

## Description

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 | Identifiant | Joueurs | Favoris | Votes positifs | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Chit Chat Dialogue System | hotpot.chitchat | 0 | 5 | 4 | 60% | https://sbox.watch/fr/libraries/hotpot/chitchat/index.md |
