Exemple #1
0
    public void FocusRandom()
    {
        if (iconHandles.Count == 0)
        {
            return;
        }
        int             index  = Random.Range(0, iconHandles.Count);
        ChildItemHandle handle = iconHandles[index];

        scrollRect.ScrollTo(handle);
    }
Exemple #2
0
    public void RemoveRandom()
    {
        if (iconHandles.Count == 0)
        {
            return;
        }
        int             index  = Random.Range(0, iconHandles.Count);
        ChildItemHandle handle = iconHandles[index];

        scrollRect.RemoveChild(handle);
        iconHandles.Remove(handle);
    }