GObjectPool
Namespace:FairyGUI
Source:Assets/Scripts/UI/GObjectPool.cs (line 10)
public class GObjectPool
GObjectPool is use for GObject pooling.
Constructors
GObjectPool(Transform)
public GObjectPool(Transform manager);
需要设置一个manager,加入池里的对象都成为这个manager的孩子
| Parameter | Type | Description |
|---|---|---|
manager | Transform |
Source:UI/GObjectPool.cs (line 30)
Fields
initCallback
public InitCallbackDelegate initCallback;
Callback function when a new object is creating.
Source:UI/GObjectPool.cs (line 21)
Methods
Clear()
public void Clear();
Dispose all objects in the pool.
Source:UI/GObjectPool.cs (line 39)
GetObject(string)
public GObject GetObject(string url);
| Parameter | Type | Description |
|---|---|---|
url | string |
Source:UI/GObjectPool.cs (line 63)
ReturnObject(GObject)
public void ReturnObject(GObject obj);
| Parameter | Type | Description |
|---|---|---|
obj | GObject |
Source:UI/GObjectPool.cs (line 88)
Properties
count
public int count { get; }
Source:UI/GObjectPool.cs (line 53)