Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

FocusType

enumeration

Switch to Manual

Description

Used by GUIUtility.GetControlID to inform the UnityGUI system if a given control can get keyboard focus.

Variables

NativeThis control can get keyboard focus on Windows, but not on Mac. Used for buttons, checkboxes and other "pressable" things.
KeyboardThis is a proper keyboard control. It can have input focus on all platforms. Used for TextField and TextArea controls.
PassiveThis control can never recieve keyboard focus.