PooledObject<T>
A pooled object wraps a reference to an instance returned to the pool when the pooled object is disposed of.
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Struct
- Namespace: UnityEngine.Pool
- Assembly: UnityEngine.CoreModule
- Implements: IDisposable
public struct PooledObject<T> : IDisposable where T : class
Remarks
It automates the return of references to avoid manual handling.
The following example shows how to use a PooledObject:
Constructors
Constructor | Description |
|---|---|
| PooledObject`1(`0,UnityEngine.Pool.IObjectPool{`0}) | Initializes the pooled object with a managed object and specifies the pool to which the instance is returned. |