Skip to content

Pooling.PoolMember

Andrés Eduardo Maldonado edited this page Jun 14, 2019 · 2 revisions

Public class from Pooling. Inherits from MonoBehaviour.

Description

Component added on runtime to objects used by the pooling system, used to identify parent Pool, and call events in IPoolable

Properties

Type Name Description
PoolBase ParentPool Reference to the Pool where it comes from
bool Uses Interface Enabled when there are IPoolable scripts, disabling this will stop the IPoolable events from being called.

Methods

Returns Name Description
void Initialize Called from Pooling, assigns parent pool.
IPoolable[] SearchInterfaces Searchs scripts on this GameObject that use IPoolable. Call this if you add a component on runtime that uses IPoolable, so it's events can be called.
void OnDeployFromPool Calls every IPoolable.OnPoolSpawn() on this Game Object.
void OnRecycleToPool Calls every IPoolable.OnPoolUnSpawn() on this Game Object.