DataConsumerCollection.ReturnGameObjectForReuse(Int32, GameObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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).