Last active
August 29, 2015 14:03
-
-
Save Tak/7941ca80015299d54078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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