Interface
Last updated
Last updated
The Pool Interface in Blueprints provides a way to manage the lifecycle of pooled objects by defining functions that can be implemented to handle the enabling and disabling of objects. This interface ensures that objects are properly prepared when they are retrieved from or returned to the pool.
Using the Pool Interface in Blueprints
When working with the Pool Interface in Blueprints, you typically focus on implementing the interface functions and ensuring that these functions are called appropriately during the object's lifecycle. Here's how to access and use the Pool Interface in Blueprints.
Implementing the Pool Interface
Add the Interface to Your Blueprint:
Open the Blueprint you want to make poolable (e.g., a character or an actor).
Go to the Class Settings.
In the Interfaces
section, click Add
and choose the PoolInterface
from the list.
Implement the Interface Functions:
After adding the interface, the functions EnableObject
and DisableObject
will be available as events in the Event Graph.
Implement these events to define what happens when the object is enabled (retrieved from the pool) and disabled (returned to the pool).