void LoadLevel() { var azure = new AzureMobileServices(_azureEndPoint, _applicationKey); azure.Lookup <LevelSaveData>(1, azureResponse => { if (azureResponse.Status == AzureResponseStatus.Success) { var data = azureResponse.ResponseData; var cubeData = JsonConvert.DeserializeObject <List <Vector3> >(data.SaveData); for (var i = 0; i < cubeData.Count && i < cubes.Count; i++) { cubes[i].position = cubeData[i]; } } }); }
void LoadLevel() { var azure = new AzureMobileServices(_azureEndPoint, _applicationKey); azure.Lookup<LevelSaveData>(1, azureResponse => { if (azureResponse.Status == AzureResponseStatus.Success) { var data = azureResponse.ResponseData; var cubeData = JsonConvert.DeserializeObject<List<Vector3>>(data.SaveData); for (var i = 0; i < cubeData.Count && i < cubes.Count; i++) { cubes[i].position = cubeData[i]; } } }); }
public void OnLookupButtonClicked() { if (serviceUser == null) { FacebookAuthText.text = "Please authenticate before using futher scenarios!"; return; } string id = "5a34a00d8ef34630b6fe19e0e2c31b8b";; AzureMobileServices.Lookup <TodoItem>(id, (response) => { if (response.Status == CallbackStatus.Failure) { Debug.LogError("Lookup record failed."); Debug.LogError(response.Exception.ToString()); return; } // print something FacebookAuthText.text = "Successfully looked up item"; Debug.Log("Successfully looked up item"); }); }