PooledList Class

Summary

Various utilities and extension methods for Weaver.PooledList`1.

More detailed instructons on how to use this class and those related to it can be found at https://kybernetik.com.au/weaver/docs/misc/object-pooling.
Assembly
Weaver.dll
Namespace
Weaver
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["PooledList"] class Type type-node

Syntax

public static class PooledList

Methods

Name Value Summary
CreateComponentPool<T>(T, int, bool) PooledList<T>
Creates a Weaver.PooledList`1 that creates new items by instantiating a specified UnityEngine.Component. The objects will not be destroyed by scene loading.

In the Unity Editor the instantiated objects will be grouped under a common parent to keep the hierarchy view tidy, but this step is skipped in runtime builds for efficiency.
static
CreateDefaultPool<T>(int) PooledList<T>
Returns a Weaver.PooledList`1 that creates new items using a parameterless constructor.
static
CreatePrefabPool(GameObject, int, bool) PooledList<GameObject>
Creates an Weaver.PooledList`1 that creates new items by instantiating a specified UnityEngine.GameObject. The objects will not be destroyed by scene loading.

In the Unity Editor the instantiated objects will be grouped under a common parent to keep the hierarchy view tidy, but this step is skipped in runtime builds for efficiency.
static
GetSharedComponentPool<T>(T, int, bool) PooledList<T>
The first time this method is called for a particular `original` it will call Weaver.PooledList.CreateComponentPool``1(``0,System.Int32,System.Boolean) and cache the returned pool so that subsequent calls using the same `original` will return the same pool.
static
GetSharedPrefabPool(GameObject, int, bool) PooledList<GameObject>
The first time this method is called for a particular `original` it will call Weaver.PooledList.CreatePrefabPool(UnityEngine.GameObject,System.Int32,System.Boolean) and cache the returned pool so that subsequent calls using the same `original` will return the same pool.
static