public override void OnInspectorGUI() { greenStyle = new GUIStyle { normal = { textColor = Color.black, background = MapUtility.GetColorTexture2D(Color.green) }, alignment = TextAnchor.MiddleCenter }; redStyle = new GUIStyle { normal = { textColor = Color.white, background = MapUtility.GetColorTexture2D(Color.red) }, alignment = TextAnchor.MiddleCenter }; wildStyle = new GUIStyle { normal = { textColor = Color.white, background = MapUtility.GetColorTexture2D(Color.blue) }, alignment = TextAnchor.MiddleCenter }; targetCell = (Cell) target; targetCell.ArrayFromProfileStr(); base.OnInspectorGUI(); EditorGUILayout.LabelField("Profile", targetCell.GetProfile()); // y = -1 EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Allow Cells"); ButtonFor(-1, -1); ButtonFor(0, -1); ButtonFor(1, -1); EditorGUILayout.EndHorizontal(); // y = 0 EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(" "); ButtonFor(-1, 0); ButtonFor(0, 0); ButtonFor(1, 0); EditorGUILayout.EndHorizontal(); // y = 1 EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(" "); ButtonFor(-1, 1); ButtonFor(0, 1); ButtonFor(1, 1); EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Rotate 90 Clockwise")) { targetCell.RotateProfile(); } }