Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

PlayerPrefs.SetInt

static function SetInt(key: string, value: int): void;

Description

Sets the value of the preference identified by key.

	PlayerPrefs.SetInt("Player Score", 10);