ScriptableComponentPool<T> Class
Definition
Section titled “Definition”A UnityEngine.ScriptableObject that holds a pool of UnityEngine.Component.
public abstract class ScriptableComponentPool<T> : ScriptablePool<T>, INotifyPropertyChanging, INotifyPropertyChanged, IStackTraceProvider, IPoolCallbacks<T> where T : ComponentType Parameters
Section titled “Type Parameters”T
The type of UnityEngine.Component.
Inheritance object → UnityEngine.Object → UnityEngine.ScriptableObject → RuntimeScriptableObject → ScriptablePool → ScriptablePool<T>
Implements INotifyPropertyChanging, INotifyPropertyChanged, IStackTraceProvider, IPoolCallbacks<T>
Properties
Section titled “Properties”Prefab
Section titled “Prefab”public T Prefab { get; set; }Methods
Section titled “Methods”CreateObject()
Section titled “CreateObject()”Called when a new object needs to be created.
protected override T CreateObject()Returns
Section titled “Returns”T
DestroyObject(T)
Section titled “DestroyObject(T)”Called when an object needs to be destroyed.
protected override void DestroyObject(T item)Parameters
Section titled “Parameters”item T
The object to be destroyed.
OnGet(T)
Section titled “OnGet(T)”Called when an object is retrieved from the pool.
protected override void OnGet(T item)Parameters
Section titled “Parameters”item T
The object that was retrieved from the pool.
OnReturn(T)
Section titled “OnReturn(T)”Called when an object is returned to the pool.
protected override void OnReturn(T item)Parameters
Section titled “Parameters”item T
The object that was returned to the pool.