object-pooling

Replace repeated Instantiate and Destroy calls with reusable pooled GameObjects in Unity.

Updated May 6, 2026
One-click install
npx skills add https://github.com/BasarEkinci/memory-card-game --skill object-pooling-basarekinci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: object-pooling
Source: https://github.com/BasarEkinci/memory-card-game/tree/main/.claude/skills/core/object-pooling
Command: npx skills add https://github.com/BasarEkinci/memory-card-game --skill object-pooling-basarekinci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Object pooling removes performance spikes caused by repeatedly allocating and destroying GameObjects during gameplay.

Core Features & Use Cases

  • Reuse GameObjects with a Pool: Get instances without frequent Instantiate, then release them for later reuse to reduce GC and frame drops.
  • Warm-Up Pools at Startup: Pre-spawn pool capacity so gameplay doesn’t hitch when the first burst of objects is needed.
  • Reset State on Release: Enforce a return-to-pool lifecycle where pooled objects clear timers, velocity, flags, and visual state before deactivation.
  • Fit the Right Objects: Use pooling for high-churn entities like projectiles, particle effects, audio sources, enemies, pickups, damage numbers, and trails—avoid pooling one-off or scene-long objects.

Quick Start

Implement a pool for your frequently spawned objects (for example projectiles) and ensure each instance resets its state before being released back into the pool.

Frequently Asked Questions about object-pooling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Instantiate and Destroy performance hitches in Unity?

Reduce Instantiate and Destroy hitches in Unity by replacing them with object pooling, which reuses active GameObjects to minimize garbage collection and prevent frame drops during gameplay.

What is the best way to pool projectiles and particle effects in Unity?

The best way to pool projectiles and particles in Unity is implementing a Get/Release contract with configurable capacities, allowing high-churn entities to be reused without frequent allocation and destruction.

How do I clear velocity and visual state when returning objects to a pool?

Clear velocity and visual state when returning objects to a pool by enforcing a deterministic reset-on-return lifecycle, ensuring pooled instances clear timers, flags, and velocity before deactivation.

Can I pre-spawn pool capacity at startup to avoid frame drops in Unity?

You can pre-spawn pool capacity at startup using optional warm-up features, which instantiate the required GameObjects before gameplay begins to eliminate initial frame drops.

When should I avoid object pooling for GameObjects in Unity?

Avoid object pooling in Unity for one-off or scene-long objects, as pooling is specifically designed for high-churn entities like enemies, pickups, and damage numbers that spawn and despawn frequently.

Does object pooling work with floating damage text and trails in Unity?

Object pooling works with floating damage text and trails in Unity by treating them as high-frequency spawn/despawn systems, reusing the instances across gameplay loops to reduce garbage collection.