Skip to content

Processor

Matt Dean edited this page Jan 15, 2020 · 1 revision

API for defining behaviour of pooling with custom C# types. See Getting started for more information.

All custom Processor classes must inherit from Processor<T> where T is the type of object you wish to add pooling support for. See the built-in class GameObjectProcessor for an example.

Public Methods

CreateInstance

return T

Create new Instance of Type T using source object.

Argument Type Description
key object Unique identifier for Pool.
source T Source object.

DestroyInstance

return void

Destroy Instance of Type T.

Argument Type Description
key object Unique identifier for Pool.
instance T Instance to destroy.

OnEnableInstance

return void

Called when instance is enabled.

Argument Type Description
key object Unique identifier for Pool.
instance T Instance to enable.

OnDisableInstance

return void

Called when instance is disabled.

Argument Type Description
key object Unique identifier for Pool.
instance T Instance to disable.

Clone this wiki locally