This site has been deprecated. Please see the new Unity Editor Foundations for up to date information.

menu
About the 2017 HIG Checklist Best Practices Inspector Organization Hiding vs Disabling Controls Multi-level Help Selection Scope Resources

Hiding vs Disabling Controls

To show users what they can and cannot modify in the interface, you have the ability to disable controls or hide them altogether. When a control is disabled, it is slightly transparent and stops receiving input. When a control is hidden, it is no longer in the interface. In both cases, the user is not able to modify or interact with the control at all. Consequently, when a control affects multiple target objects (as in the Inspector when multiple objects are selected) it should be hidden or disabled according to the most conservative target in the list, since it may not be valid or applicable for all targets.

Deciding which method is best for your situation depends on whether the control is for input or for taking an action.

Input Controls

  • Hide input controls (e.g., Text Fields, Color Fields or Popups) when the value shown is currently irrelevant and not used.
  • When you’re hiding controls based on the value of another control, always place the hidden control somewhere below the control that triggers the hiding. Ideally, the hidden control should be on the next line.
  • Disable the control when the value shown is still relevant, but it is uneditable. For example, a control whose value is automatically determined under some condition should appear disabled if its value might still be used by the component or some other system.

Disabled Input Control

Buttons

  • Disable the control to indicate that the user needs to do something first to “unlock” the functionality that this button performs.
  • Buttons should never be hidden, because there is an expectation of persistence for them.

Disabled Button

On This Page