Language
Edit

IDataCollectionItemPlacer Interface

Definition

Interface for placing items from a list into the game object hierarchy in a meaningful way.

public interface IDataCollectionItemPlacer
type IDataCollectionItemPlacer = interface
Public Interface IDataCollectionItemPlacer
Derived

Remarks

An object implementing this interface can be dependency injected into the DataConsumerCollection (or similar) Component via the Unity inspector.

In addition to controlling how a list is visualized, it can also be used to manage list pagination, virtualization and predictive prefetching.

When a list has changed, this object will be notified. It can then request a range of game objects to be provided for placement, where each game object has been modified to reflect the data associated with that entry in the list. The game object will typically be a prefab of arbitrary complexity.

Methods

Name Description
Attach()

Attach item placer and prepare for use

Detach()

Detach item placer and remove any visible items/

EndPlacement()

End placement for the requested range of game objects

GetPageNumber()

Get current page number for first visible item.

GetTotalPageCount()

Get the total number of pages in the collection based on current page size.

MoveAbsolute(Int32, Boolean)

Scroll visible data window to the specified first visible item

MoveRelative(Int32, Boolean)

Move visible data window by itemCount items forward or backward

MoveToNextItem()

Scroll forward one item if possible.

MoveToPreviousItem()

Scroll back one item if possible.

NotifyCollectionDataChanged(DataChangeType, String, Object)

Notification that the collection being managed by the data consumer for this object has changed.

PageBackward()

Scroll back one page of visible items, if possible, or to beginning if partial page.

PageForward()

Scroll forward one visible page of items, if possible, or to end of collection if partial page.

PlaceItem(Object, Int32, String, GameObject)

Place a game object into the experience previously requested via IDataConsumer.RequestCollectionItems()

SetDataConsumerCollection(IDataConsumerCollection)

Set the data consumer for a collection that can provide game objects to be placed.

StartPlacement()

Start placement for the requested range of game objects.

Applies to