-
Import NGUI before use.
-
Download, unzip, then copy files to Unity Assets folder.
-
Modify UIScrollView.cs , add virtual keyword to Press and RestrictWithinBounds void like below.
public virtual void Press (bool pressed)
public virtual bool RestrictWithinBounds (bool instant, bool horizontal, bool vertical)
-
Open TestScene and play it!
-
Use LoopScrollView.cs instead of UIScrollView.cs.
-
Set UIGrid position topmost and center horizontal(↑) for vertical scroll view, leftmost and center vertical(←) for horizontal scroll view.
-
Your custom controller must inherit VerticalLoopGridControl or HorizontalLoopGridControl. Don't forget drag components to inspector and set prefab path.