Summary
A simple object pooling system.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["ObjectPool<T>"]
class Type type-node
Syntax
public static class ObjectPool<T> where T : class, new()
Remarks
T must not inherit from
UnityEngine.Component
or UnityEngine.ScriptableObject
.Type Parameters
Name | Description |
---|---|
T |
Properties
Methods
Name | Value | Summary |
---|---|---|
Acquire |
T |
Returns a spare item if there are any, or creates a new one.
static
|
GetDetails |
string |
Returns a description of the state of this pool.
static
|
IncreaseCapacityTo |
void |
Increases the
Animancer.ObjectPool`1.Capacity to equal the `capacity` if it was lower.static
|
IncreaseCountTo |
void |
Increases the
Animancer.ObjectPool`1.Count to equal the `count` if it was lower.static
|
Release |
void |
Adds the `item` to the list of spares so it can be reused.
static
|