generated from pancake-llc/package
-
Notifications
You must be signed in to change notification settings - Fork 16
Pool
yenmoc edited this page Jun 21, 2023
·
16 revisions
Interface Contains a single method called Create
to create an object of type T
Abstract class inherite from ScriptableObject
and interface IFactory
Class inherite from abstract class ScriptableFactory
. It contains a prefab
property and implements the Create
method by calling unity's Instantiate
API
Interface IPool
will contain 3 main methods
-
Prewarm
will receive the pool size to be initialized and perform initialization first. if a pool is already initialized it will not initialize again -
Request
request to get an element from pool -
Return
perform element return to pool