IDataCollectionItemPlacer.PlaceItem(Object, Int32, String, 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.
Place a game object into the experience previously requested via IDataConsumer.RequestCollectionItems()
public void PlaceItem(object requestRef, int itemIndex, string itemKeyPath, UnityEngine.GameObject itemGO);
abstract member PlaceItem : obj * int * string * UnityEngine.GameObject -> unit
Public Sub PlaceItem (requestRef As Object, itemIndex As Integer, itemKeyPath As String, itemGO As GameObject)
Parameters
- requestRef
- Object
Any desired private object, initially provided to RequestCollectionItems()
- itemIndex
- Int32
The absolute item index in the data source array.
- itemKeyPath
- String
The localKeypath identifier for the item at the received index.
- itemGO
- UnityEngine.GameObject
The game object created using the data at the specified item index.
Remarks
All calls to this method will be within a StartPlacement() and a EndPlacement() call.
The request id will always be the request Id provided to the IDataConsumer.RequestCollectionItems() method that triggered the calls to this method. This can be used to associate additional data in a complex scenario where there may be more than one data consumer associated with this item placer.
Note that the range start and range count could have been provided via state data associated with the requestRef, but to simplify the most common uses, it is provided explicitly.