Unity データの保存 ( PlayerPrefs )
データの保存。
PlayerPrefs.SetInt( "score", 123 );
PlayerPrefs.Save ();
データの読み込み。
int cc;
cc = PlayerPrefs.GetInt( "score" );
データの消去。
PlayerPrefs.DeleteKey( "score" );
PlayerPrefs.SetInt( "score", 123 );
PlayerPrefs.Save ();
データの読み込み。
int cc;
cc = PlayerPrefs.GetInt( "score" );
データの消去。
PlayerPrefs.DeleteKey( "score" );
テーマ : Unityゲーム制作
ジャンル : コンピュータ