文档

Unity Engine

Unity Engine

PooledObject<T>

A pooled object wraps a reference to an instance returned to the pool when the pooled object is disposed of.
阅读时间1 分钟最后更新于 1 个月前

Definition

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.