Summary
A
System.Collections.Generic.List`1
of active objects backed by an Weaver.ObjectPool`1
of inactive objects ready to
be reused.
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
- ObjectPool
<T>
graph BT
Type-->Base0["ObjectPool<T>"]
Base0-->Base1["Object"]
Type["PooledList<T>"]
class Type type-node
Syntax
public sealed class PooledList<T> : ObjectPool<T> where T : class
Type Parameters
Name | Description |
---|---|
T |
Constructors
Name | Summary |
---|---|
PooledList |
Creates a new Weaver.PooledList`1 which will create new items as necessary using the
`createItem` delegate.
|
Fields
Name | Constant Value | Summary |
---|---|---|
ActiveObjects |
The objects currently in use.
|
Methods
Name | Value | Summary |
---|---|---|
ReleaseAt |
void |
Puts an item back into the pool to be available for future use.
|
ReleaseRange |
void |
Puts a range of items back into the pool to be available for future use.
|
Extension Methods
Name | Value | Summary |
---|---|---|
Release |
UnityAction |
Registers a
UnityEngine.SceneManagement.SceneManager.sceneUnloaded callback to call Weaver.ObjectPool`1.ReleaseAll .
The returned delegate can be stored to later unregister from the event if necessary.
From ObjectPool
|
TryRelease |
bool |
If the `pool` isn't null this method gives the `item` to it and returns true.
From ObjectPool
|