Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

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

PreferenceItem

class in UnityEditor

Switch to Manual

Description

The PreferenceItem attribute allows you to add preferences sections to the Preferences Window.

The PreferenceItem attribute turns any static function into an OnGUI callback. Only static functions can use the PreferenceItem attribute.

no example available in C#

Constructors

PreferenceItemCreates a section in the Preferences Window called name and invokes the static function following it for the section's GUI.