Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

EditorPrefs.GetInt

Switch to Manual
public static function GetInt(key: string, defaultValue: int = 0): int;

Parameters

Description

Returns the value corresponding to key in the preference file if it exists.

If the value doesn't already exist in the preference file the function will return defaultValue. See Also: SetInt.