Skip to content
Version 2.11.0
↓ Get the launcher

VirtualListMath class

Pure scroll-windowing math for VirtualListElement (BCL only, unit-tested on CI). The renderer maps a ScrollRect’s content offset to the first logical row to bind.

public static class VirtualListMath
name description
static ContentHeight(…) Total content height the scroll viewport must span (so the scrollbar reflects the full list).
static FirstIndex(…) First logical index to render given the vertical scroll offset (px from the top of the content), the fixed row height, the total logical count, and the rendered pool size. Clamped so the window [first, first+pool) never runs past the end (or below 0).