Skip to content

Instantly share code, notes, and snippets.

@Tak
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tak/7941ca80015299d54078 to your computer and use it in GitHub Desktop.
Save Tak/7941ca80015299d54078 to your computer and use it in GitHub Desktop.
{
var bufferNames = new[]{ "MapData" };
bool done = false;
mConnectedStorage.GetAsync(bufferNames, (storage,op,view) => {
if (op.Success)
{
foreach( bufferName in bufferNames )
{
byte[] buffer = view.GetBuffer( bufferName );
// do something fancy shmancy with the data
}
}
done = true;
});
for (int i = 0; i < 100 && !done; ++i)
Thread.Sleep (100);
if (!done)
Debug.LogError ("Error loading from connected storage");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment