Click or drag to resize

AbstractViewsHolder Methods

The AbstractViewsHolder type exposes the following members.

Methods
  NameDescription
Public methodCollectViews
If instead of calling Init(GameObject, Int32, Boolean, Boolean), the initializaton is done manually, this should be called lastly as part of the initialization phase
Public methodInit(GameObject, Int32, Boolean, Boolean)
Instantiates rootPrefabGO, assigns it to root and sets its itemIndex to itemIndex. Activates the new instance if activateRootGameObject is true. Also calls CollectViews if callCollectViews is true
Public methodInit(RectTransform, Int32, Boolean, Boolean)
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!
Public methodShiftIndex
This is only called when an item is being shifted due to an InsertItems(Int32, Int32, Boolean, Boolean) or RemoveItems(Int32, Int32, Boolean, Boolean) call, but since its data remains the same (the models are shifted to make room for the others, but they don't change), there's no need to call UpdateViewsHolder(TItemViewsHolder)

Don't forget to call the base implementation first if you override this method!

Don't forget to call the base implementation first if you override this method!

Protected methodShiftIntWithOverflowCheck
Internal utility for adding a shift to value and keeping it within range [0, modulo), and also preventing integer overflow
Top
See Also