Skip to content

Instantly share code, notes, and snippets.

@openroomxyz
Created April 10, 2020 11:17
Show Gist options
  • Save openroomxyz/8ae33ec6793a7af92296737c44b4c7df to your computer and use it in GitHub Desktop.
Save openroomxyz/8ae33ec6793a7af92296737c44b4c7df to your computer and use it in GitHub Desktop.
Unity : How to write by appending to binary Files using FileStreams ?
using System.IO;
using (var fileStream = new FileStream(file_path, FileMode.Append, FileAccess.Write, FileShare.None))
using (var bw = new BinaryWriter(fileStream))
{
bw.Write(0.0f);
byte[] lotsOfData;
bw.Write(lotsOfData);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment