Как вы сказали, вам нужно позвонить PhotoCapture.CreateAsync
до того, как вы заполните PhotoCapture.
Вы можете получить пример кода здесь и фрагмент кода ниже:
private void Start()
{
PhotoCapture.CreateAsync(false, this.OnPhotoCreated);
}
// This method store the PhotoCapture object just created and retrieve the high quality
// available for the camera and then request to start capturing the photo with the
// given camera parameters.
private void OnPhotoCreated(PhotoCapture captureObject)
{
Resolution cameraResolution = PhotoCapture.SupportedResolutions.OrderByDescending((res) => res.width * res.height).First();
CameraParameters c = new CameraParameters()
{
hologramOpacity = 0.0f,
cameraResolutionWidth = cameraResolution.width,
cameraResolutionHeight = cameraResolution.height,
pixelFormat = CapturePixelFormat.BGRA32
};
// captureObject.StartPhotoModeAsync(c, this.OnPhotoModeStarted);
}