I'm trying to get the CameraCapture sample to work on Hololens 2 but when I use the voice command start preview it executes the functions SetSpatialCoordinateSytem and StartPreview as it should but the display does not show the camera feed. When I checked the unity.log file it shows a HResult 0x80070057 right after executing the StartPreview function and then a message saying "A task was canceled"
According to this the HResult means there is an incorrect parameter, which I would not know what parameter is the problem. Here is the whole section of the log that comes right after executing StartPreview
I thought it might be something related to permissions for the app but I already gave it all permissions manually and it still won't work. Any idea how to fix this?
I'm trying to get the CameraCapture sample to work on Hololens 2 but when I use the voice command start preview it executes the functions SetSpatialCoordinateSytem and StartPreview as it should but the display does not show the camera feed. When I checked the unity.log file it shows a HResult 0x80070057 right after executing the StartPreview function and then a message saying "A task was canceled"
According to this the HResult means there is an incorrect parameter, which I would not know what parameter is the problem. Here is the whole section of the log that comes right after executing StartPreview
`HResult: 0x80070057
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:LogError(Object) CameraCapture.BasePlugin`1:OnFailed(FailedState) CameraCapture.CameraCapture:OnFailed(FailedState) CameraCapture.<>c__DisplayClass20_0:b0()
System.Runtime.Remoting.Contexts.CrossContextDelegate:Invoke()
CameraCapture.d 22:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
A task was canceled. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:LogError(Object) CameraCapture.d28:MoveNext()
System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object)
System.Threading.TimerCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Runtime.Remoting.Contexts.CrossContextDelegate:Invoke()
System.Threading.Tasks.AwaitTaskContinuation:InvokeAction(Object)
System.Threading.TimerCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task:CancellationCleanupLogic()
System.Threading.Tasks.Taskb0()
System.Runtime.Remoting.Contexts.CrossContextDelegate:Invoke()
CameraCapture.d 22:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)`
1:TrySetCanceled(CancellationToken, Object) System.Threading.Tasks.Task
1:TrySetCanceled(CancellationToken) System.Threading.Tasks.TaskCompletionSource1:TrySetCanceled(CancellationToken) System.Threading.Tasks.TaskCompletionSource
1:TrySetCanceled() CameraCapture.CameraCapture:OnFailed(FailedState) CameraCapture.<>cDisplayClass20_0:I thought it might be something related to permissions for the app but I already gave it all permissions manually and it still won't work. Any idea how to fix this?