public static int SelectionGrid(OCBlockSet blockSet, int index, params GUILayoutOption[] options) { Container <Vector2> scroll = EditorGUIUtils.GetStateObject <Container <Vector2> >(blockSet.GetHashCode()); scroll.value = GUILayout.BeginScrollView(scroll, options); index = SelectionGrid(blockSet.Blocks, index); GUILayout.EndScrollView(); return(index); }
public static Block SelectionGrid(BlockSet blockSet, Block selected, params GUILayoutOption[] options) { Container <Vector2> scroll = EditorGUIUtils.GetStateObject <Container <Vector2> >(blockSet.GetHashCode()); scroll.value = GUILayout.BeginScrollView(scroll, options); selected = SelectionGrid(blockSet, selected); GUILayout.EndScrollView(); return(selected); }