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 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); }