2017-04-20 6 views
0

私はHoloLensとUnityを使用しています。写真を撮ろうとしています。PhotoCapture.CreateAsync()never executed

void Start() { 
    Debug.LogError("CreateAsync start"); 
    Debug.LogError(WebCam.Mode); 
    Debug.LogError(PhotoCapture.SupportedResolutions); 
    foreach (Resolution resolution in PhotoCapture.SupportedResolutions) { 
    Debug.LogError(resolution); 
    } 
    Debug.LogError("END"); 
    PhotoCapture.CreateAsync(false, delegate (PhotoCapture captureObject) { 
    Debug.LogError("CreateAsync done"); 
    } 
} 

印刷この出力:ここ

CreateAsync start 
None 
UnityEngine.Resolution[] 
END 

は私の「機能である

が、私はこの議論 https://forums.hololens.com/discussion/897/locatable-camera-known-issue-photocapture-createasync-doesnt-start

ユニティでMonoBehaviourでこのコードのように同じ問題を抱えています"Package.appxmanifestの一部:

ここ

は、ログの「モジュール情報」の部分である:

Module information: 
Built with Compiler Ver '190023918' 
Built from '5.5/release' branch 
Version is '5.5.3f1 (4d2f809fd6f3)' 
Release build 
Application type 'D3D11' 
Used 'UWP' 

OS 'Windows 10 (10.0.14393)' 

あなたは私の問題を参照していますか? 他のスクリプトで実行をブロックできますか? hololensで

+0

いくつかのブレークポイントでは、コードが行に達したときに 'IMediaCaptureを初期化できませんでした:' PhotoCapture.CreateAsync() 'というエラーがあります。 –

答えて

0

Settings/Privacy/Camera/"Let apps use my camera" => ON

それは私がこのケースで明示的なエラーメッセージがあったことを望む作品... です。