Click or drag to resize

CellViewsHolder Methods

The CellViewsHolder type exposes the following members.

Methods
  NameDescription
Public methodCollectViews
Calls base's implementation, after which calls GetViews whose result is stored in views
(Overrides AbstractViewsHolderCollectViews.)
Protected methodGetViews
Provide the cell's child GameObject that contains its views
Public methodInit
Cannot be used. Throws InvalidOperationException. Use InitWithExistingRootPrefab(RectTransform) instead
(Overrides AbstractViewsHolderInit(GameObject, RectTransform, Int32, Boolean, Boolean).)
Public methodInitWithExistingRootPrefab

Assigns the root, sets ItemIndex to -1 and calls CollectViews. Note that this uses an already-instantiated cell

root (by the parent group), as opposed to how Init(GameObject, RectTransform, Int32, Boolean, Boolean) works. This is because the group itself manages its cells and their layouting

Public methodMarkForRebuild
Make sure to override this when you have children layouts (for example, a [Vertical/Horizontal/Grid]LayoutGroup) and call MarkLayoutForRebuild(RectTransform) for them. Base's implementation should still be called!
(Overrides AbstractViewsHolderMarkForRebuild.)
Top
See Also