void Start() { //define the shapes list shapes = new List <TableShape> (); //Create new shapes CreateShapes(); //Setup the last selected group/shape index ScrollSlider scrollSlider = GameObject.FindObjectOfType <ScrollSlider> (); if (saveLastSelectedGroup && ShapesManager.instance != null) { scrollSlider.currentGroupIndex = ShapesManager.instance.lastSelectedShape; } }
public void PointerButtonEvent(Pointer pointer) { if (pointer == null) { return; } if (pointer.group != null) { ScrollSlider scrollSlider = GameObject.FindObjectOfType(typeof(ScrollSlider)) as ScrollSlider; if (scrollSlider != null) { scrollSlider.DisableCurrentPointer(); FindObjectOfType <ScrollSlider>().currentGroupIndex = pointer.group.Index; scrollSlider.GoToCurrentGroup(); } } }