EditorPrefs

class in UnityEditor

Switch to Manual

Description

Stores and accesses Unity editor preferences.

On macOS, EditorPrefs are stored in ~/Library/Preferences/com.unity3d.UnityEditor5.x.plist.

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

Static Functions

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 float value corresponding to key if it exists in the preference file.
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 file.
SetBoolНазначает значение для параметра с идентификатором key.
SetFloatSets the float 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. Note that EditorPrefs does not support null strings and will store an empty string instead.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961