GameObject Pooler
FreakLib.Pooling.IPoolItem Interface Reference

An interface that will allow scripts on a pool item to receive callbacks when they are borrowed or returned. More...

Public Member Functions

void OnBorrow ()
 This method is called whenever an object is borrowed from the Pool. More...
 
void OnReturn ()
 This method is called whenever an object is returned to the Pool. More...
 

Detailed Description

An interface that will allow scripts on a pool item to receive callbacks when they are borrowed or returned.

This will only work if the Pool.UseInterfaceCallbacks property has been set to true (in inspector or by code).

Using this interface comes at a cost to performance, so only use it if you need it and can afford the cost. You can normally just use the regular OnEnable and OnDisable methods instead.

Member Function Documentation

void FreakLib.Pooling.IPoolItem.OnBorrow ( )

This method is called whenever an object is borrowed from the Pool.

void FreakLib.Pooling.IPoolItem.OnReturn ( )

This method is called whenever an object is returned to the Pool.


The documentation for this interface was generated from the following file: