Version: 5.3 (switch to 5.4b)
ЯзыкEnglish
  • C#
  • JS

Язык программирования

Выберите подходящий для вас язык программирования. Все примеры кода будут представлены на выбранном языке.

EditorPrefs

class in UnityEditor

Руководство

Описание

Stores and accesses Unity editor preferences.

На Mac OS X, настройки редактора хранятся в ~/Library/Preferences/com.unity3d.UnityEditor.plist.

On Windows, EditorPrefs are stored in the registry under the HKCU\Software\Unity Technologies\UnityEditor key.

Статические функции

DeleteAllУдаляет все ключи и значения из настроек. Используйте с осторожностью.
DeleteKeyRemoves key and its corresponding value from the preferences.
GetBoolReturns the value corresponding to key in the preference file if it exists.
GetFloatReturns the value corresponding to key in the preference file if it exists.
GetIntReturns the value corresponding to key in the preference file if it exists.
GetStringReturns the value corresponding to key in the preference file if it exists.
HasKeyReturns true if key exists in the preferences.
SetBoolSets the value of the preference identified by key.
SetFloatSets the value of the preference identified by key.
SetIntSets the value of the preference identified by key as an integer.
SetStringSets the value of the preference identified by key.