> For the complete documentation index, see [llms.txt](https://ironsami-studio.gitbook.io/blood-screen-pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ironsami-studio.gitbook.io/blood-screen-pro/basics/openapi.md).

# BSP Pooling Manager

## 🔁 BSP\_PoolingManager

The `BSP_PoolingManager` is a **standalone pooling system** designed specifically for use with the *BloodScreensPro* asset. It is included by default on the `BloodScreensPro` prefab, but you can remove or replace it if you prefer to use your own pooling system.<br>

<figure><img src="https://3579135912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F72StjR34vSJ02PW0cVH0%2Fuploads%2F1qESNOnVRkLs2hQG1ulT%2Fimage.png?alt=media&amp;token=9f44a3d4-108b-4192-a5a6-5cef9e506c24" alt=""><figcaption></figcaption></figure>

***

### 🎯 Purpose & Usage

This component is **essential when using Stack-on-Top Mode**, where each blood effect spawns as a **separate canvas object** layered dynamically over the screen. Without pooling, this could lead to performance issues due to constant instantiation and destruction of UI elements.

* In **Stack-on-Top Mode**, **pooling is required** to keep things fast and smooth.
* In **Overwrite Mode**, **pooling is not needed**, as a single canvas is reused for all effects.

The pooling manager is automatically added to your scene as part of the **BloodScreensPro Object**, which also hosts the `BloodScreensProManager`.<br>

<figure><img src="https://3579135912-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F72StjR34vSJ02PW0cVH0%2Fuploads%2F0mXKQvylda5KEMbRWewg%2Fimage.png?alt=media&amp;token=bb58bbb6-f962-4e80-a8d9-619903af80cb" alt=""><figcaption><p>The clones are objects that have been added to the pool.</p></figcaption></figure>

***

### ✨ Key Features

#### ✅ Prefab Pooling

* Assign the **blood screen prefabs** you want to pool via the Inspector.

#### 🧠 Fixed or Dynamic Pooling

* **Fixed Pool Size:** Limit memory usage by setting a max instance count.
* **Dynamic Expansion:** Let the pool **automatically grow** at runtime when needed.

#### 🗂️ Parent Transform Assignment

* Set a **Transform parent** for all pooled instances.
* Keeps the hierarchy clean and organized at runtime.

All pooled objects are:

* Created at runtime
* Disabled by default
* **Activated on demand**, then **returned to the pool** after use

***

### 🧩 Component Summary

| Property             | Description                                                  |
| -------------------- | ------------------------------------------------------------ |
| **Component Name**   | `BSP_PoolingManager`                                         |
| **Default Location** | Attached to the `BloodScreensPro` prefab                     |
| **Used By**          | `BloodScreensProManager` on the `BloodScreensPro` GameObject |
| **Required For**     | Only needed when using **Stack-on-Top Mode**                 |

***

> 💡 **Tip:**\
> If you're using a custom UI pooling system, you can safely **remove the `BSP_PoolingManager`** and plug in your own logic instead.
