public void LoadLogo() { SaveLogo data = SaveSystem.LoadLogo(); logo1 = data.logo1; logo2 = data.logo2; }
public static void saveLogo(LogoSystem logoSystem) { BinaryFormatter formatter = new BinaryFormatter(); string path = Application.persistentDataPath + "/logo.save"; FileStream stream = new FileStream(path, FileMode.Create); SaveLogo data = new SaveLogo(logoSystem); formatter.Serialize(stream, data); stream.Close(); }
public static SaveLogo LoadLogo() { string path = Application.persistentDataPath + "/logo.save"; if (File.Exists(path)) { BinaryFormatter formatter = new BinaryFormatter(); FileStream stream = new FileStream(path, FileMode.Open); SaveLogo data = formatter.Deserialize(stream) as SaveLogo; stream.Close(); return(data); } else { Debug.Log("Save file not found in " + path); return(null); } }