void DrawToggle(int i, Editor value) { value.serializedObject.Update(); Component component = value.target as Component; bool isVisible = IsVisible(value); SUI.GUIChanged(() => { GUIContent content = SUI.Content(component); content.text = string.Format("{0} - {1}", i, component.GetType().Name); isVisible = SUI.Toggle(isVisible, content, "Radio", SUI.Height(SUI.LineHeight)); }, () => { SetVisible(value, isVisible); }); value.serializedObject.ApplyModifiedProperties(); editor.Repaint(); Repaint(); }
// Main void DrawMaskField() { SUI.GUIChanged(MaskFieldVertical, UpdateVisibility); }