void OnCapturedPhotoToMemory(PhotoCapture.PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame) { // Copy the raw image data into the target texture photoCaptureFrame.UploadImageDataToTexture(targetTexture); byte[] pic = targetTexture.EncodeToJPG(); if (FocusedValue == null) { if (lastCreated != null) { FocusedValue = lastCreated; } else { return; } } azure.PutImage(pic, FocusedValue.name + ".jpg"); StartCoroutine(GetTexture(FocusedValue)); PlaceImage(); }