Language
Edit

DataConsumerCollection.ReturnGameObjectForReuse(Int32, GameObject) Method

Definition

Report that the specified game object (prefab) is no longer visible and can be recycled.

public void ReturnGameObjectForReuse(int itemIndex, UnityEngine.GameObject itemGO);
abstract member ReturnGameObjectForReuse : int * UnityEngine.GameObject -> unit
override this.ReturnGameObjectForReuse : int * UnityEngine.GameObject -> unit
Public Sub ReturnGameObjectForReuse (itemIndex As Integer, itemGO As GameObject)

Parameters

itemIndex
Int32

Index of the game object being returned.

itemGO
UnityEngine.GameObject

The game object itself.

Implements

Remarks

This is the mechanism for returning a prefab to a pool of available prefabs so that they can be repopulated with new embedded data, but otherwise are ready-to-go.

Note: If you need to know when an item has been removed, override ItemRemoved(Int32, GameObject).

Applies to