PlayerPrefs.SetFloat 设置浮点键值

static function SetFloat (key : string, value : float) : 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.SetFloat("Player Score", 10.0F);
	}
}
PlayerPrefs.SetFloat("Player Score", 10.0);
Page last updated: 2012-5-27