Here we want to do some Web & Cloud saving and loading:
1 2 3 4 |
Debug.Log ( "Saving..." ); SaveGameWeb web = new SaveGameWeb ( "username", "password", "http://example.com" ); yield return web.Save<int> ( "score", 596 ); Debug.Log ( "Save Done" ); |
You can access the progress of the Upload by accessing Request uploadProgress proprty:
1 2 |
Debug.LogFormat ( "The Save Progress is: {0}", web.Request.uploadProgress ); Debug.LogFormat ( "The Load Progress is: {0}", web.Request.downloadProgress ); |
And check for errors by using IsError property:
1 2 3 4 5 |
if ( web.IsError ) { Debug.LogError ( web.Error ); } else { Debug.Log ( "Successful" ); } |