Version: 2017.1
public static void SetInt (string key, int value);

描述

设置由 key 标识的偏好的值。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { PlayerPrefs.SetInt("Player Score", 10); } }