Repository navigation
v2.0.0
This major release has been created due to several breaking changes to the ObjectPool system.
Upgrading to this release will require updating syntax of scripts that utilize poolables.
Added
- Added
Poolable.Instanceclass, enabling usage of poolables that expire when the object is returned. - Added
Poolable.Identifierproperty: a unique id that is assigned to a poolable when retrieved and revoked when returned.
Changed
- Poolable objects that are incorrectly created using
Object.Instantiateare now immediately destroyed and log an error. ⚠️ Breaking: TheObjectPool.Instantiatemethods now return aPoolable.Instanceinstead of thePoolableitself.- To update: replace variable type with Poolable.Instance.
- Use
Poolable.Instance.IsActiveto check if the instance is not null- Instances can be implicitly cast to bool for this check as well.
- Use
Poolable.Instance.Poolableto access the Poolable behavior as before- Will return null when the Poolable has been returned or disposed.
Removed
⚠️ Breaking: Removed public access toPoolable.poolSettings- The pool settings defined on the Poolable component should not be modified at runtime.
⚠️ Breaking: Removed set access for values ofPoolSettings- Modifying these values directly had very erratic behavior.