Click or drag to resize

BaseParams Fields

The BaseParams type exposes the following members.

Fields
  NameDescription
Protected field_DefaultItemSize
The size of all items for which the size is not specified
Public fieldcontent
Public fieldcontentGravity
The effect of this property can only be seen when the content size is smaller than the viewport, case in which there are 3 possibilities: place the content at the start, middle or end. NONE doesn't change the content's position (it'll be preserved from the way you aligned it in edit-mode)
Public fieldcontentPadding
Padding for the 4 edges of the content panel
Public fieldcontentSpacing
Spacing between items (horizontal if the ScrollRect is horizontal. else, vertical)
Public fieldgalleryEffectAmount
Applies 1 scale for the item in the middle and gradually lowers the scale of the side items. 0=no effect, 1=the most sideways items will have 0 scale. galleryEffectViewportPivot can be used to apply scaling weight in other place than the middle
Public fieldgalleryEffectViewportPivot
0=start, 1=end
Public fieldloopItems

If true: When the last item is reached, the first one appears after it, basically allowing you to scroll infinitely.

Initially intended for things like spinners, but it can be used for anything alike. It may interfere with other functionalities in some very obscure/complex contexts/setups, so be sure to test the hell out of it.

Also please note that sometimes during dragging the content, the actual looping changes the Unity's internal PointerEventData for the current click/touch pointer id,

so if you're also externally tracking the current click/touch, in this case only 'PointerEventData.pointerCurrentRaycast' and 'PointerEventData.position'(current position) are

preserved, the other ones are reset to defaults to assure a smooth loop transition

Public fieldminNumberOfObjectsToKeepInMemory Obsolete.
Public fieldrecycleBinCapacity

How much objects besides the visible ones to keep in memory at max, besides the visible ones

By default, no more than the heuristically found "ideal" number of items will be held in memory

Set to a positive integer to limit it - Not recommended, unless you're OK with more GC calls (i.e. occasional FPS hiccups) in favor of using less RAM

Public fieldscrollRect
The ScrollRect that'll be optimized. It's set in InitIfNeeded(ISRIA)
Public fieldupdateMode
See BaseParamsUpdateMode enum for full description. The default is ON_SCROLL_THEN_MONOBEHAVIOUR_UPDATE and if the framerate is acceptable, it should be leaved this way
Public fieldviewport
If null, scrollRect is considered to be the viewport
Top
See Also