UIExtensions.EnsureItemVisibility
Declaration#
public static void EnsureItemVisibility(ScrollRect scrollRect, GameObject target)Parameters#
| Name | Description |
|---|---|
| scrollRect | ScrollRect containing item |
| target | Item to ensure is visible |
Description#
Ensure an item is visible within a scroll rect by adjust scrollbar positions as needed
Usage#
Example
using NullSave.GDTK;using UnityEngine;using UnityEngine.UI;
public class Example : MonoBehaviour{
public void ExampleMethod(ScrollRect scrollRect, GameObject selectedItem) { scrollRect.EnsureItemVisibility(selectedItem); }
}