New answers tagged

2

The problem was caused by another SaveTime() method in the same script that was writing to the same file "playerInfo.dat". public void SaveTime() { BinaryFormatter bf = new BinaryFormatter (); FileStream file = File.Open (Application.persistentDataPath + "/playerInfo.dat", FileMode.Open); PlayerData data = new PlayerData (); data.savedTime = ...



Top 50 recent answers are included