Skip to content
简体中文

Reuse Godot nodes ​

Create a node pool ​

Derive a pool from AbstractNodePoolSystem<TKey, TNode> and create nodes by key. Implement IPoolableNode so borrowing restores usable state and returning clears data and subscriptions from the previous use. Prewarming can move creation work to a load phase.

Manage borrowed nodes ​

Run pool operations and node callbacks on the Godot main thread. Gameplay owns each active node and returns it once with the original key. On shutdown, stop spawning, return active nodes, and then clear the pool. Decide whether to pool nodes using measured frame time, allocations, and retained memory.

Apache License 2.0