static function SetString (key : string, value : string) : void
Description描述
Sets the value of the preference identified by key.
设置由key确定的参数值。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
PlayerPrefs.SetString("Player Name", "Foobar");
}
}
PlayerPrefs.SetString("Player Name", "Foobar");