diff --git a/Editor/UIExtensionsMenuOptions.cs b/Editor/UIExtensionsMenuOptions.cs index 9e9267b..57af6ec 100644 --- a/Editor/UIExtensionsMenuOptions.cs +++ b/Editor/UIExtensionsMenuOptions.cs @@ -1656,17 +1656,22 @@ namespace UnityEditor.UI [MenuItem("GameObject/UI/Extensions/Segmented Control", false)] static public void AddSegmentedControl(MenuCommand menuCommand) { - GameObject go = CreateUIElementRoot("Segmented Control", menuCommand, s_ThinGUIElementSize); + GameObject go = CreateUIElementRoot("Segmented Control", menuCommand, s_ThickGUIElementSize); SegmentedControl control = go.AddComponent(); Color selectedColor = new Color(0f, 0.455f, 0.894f); - control.selectedColor = selectedColor; var labels = new string[] { "This", "That", "Other" }; for (int i = 0; i < 3; i++) { - var button = AddButtonAsChild(go); + var button = AddButtonAsChild(go).GetComponent