예제 #1
0
	// Save Methods
    public void Save()
    {
        //Load in the file
        BinaryFormatter bf = new BinaryFormatter();
        FileStream file = File.Create(Application.persistentDataPath + "/playerInfo.dat");

        // Brings in the SaveData 
        SaveData data = new SaveData();

        // Save to SaveData here
        data.setHighScores(score);

        // Loads file with data.
        bf.Serialize(file, data);
        file.Close();
    }