Object Pooling
  • Pool Pool Pool
  • Components
    • Pool Manager
    • Pool Asset
    • Project Configuration
  • Interface
  • Global Functions
Powered by GitBook
On this page

Global Functions

PreviousInterface

Last updated 10 months ago

Custom global functions in Blueprints enhance the functionality of the Pool Manager and object pooling system without requiring C++ coding. These functions can be accessed and used from any Blueprint, providing flexibility and ease of use in managing object pools.

Blueprint Function Library: PoolFunctionLibrary

A Blueprint Function Library allows you to define static functions that can be called from any Blueprint in your project. Below is the documentation for using custom global functions in Blueprints for object pooling.

Available Functions

The PoolFunctionLibrary Blueprint Function Library includes several key functions for managing object pools:

  1. GetObjectFromPool

  2. AddObjectToPool

  3. GetPoolAssetKeys

  4. GetKeysFromAllAssets

  5. GetGlobalPoolSettings

  6. GetPoolManager

1. GetObjectFromPool

Purpose: Retrieves an object from the pool based on specified parameters.

Blueprint Function: GetObjectFromPool

Parameters:

  • CallFrom: The actor calling this method.

  • Category: The category of the object pool to search.

  • Location: The location to spawn the retrieved object.

  • Rotation: The rotation of the retrieved object.

Return: The retrieved object if successful, null otherwise.