- Home /
Desktop Duplication results into editor crash
Hi, I am currently working on a project where I need my current desktop to be rendered in my Unity game window and later visualize the same in Oculus DK2. I have succeeded in duplicating the desktops using Desktop Duplication API and in Unity I am rendering the same duplicated desktop onto a 3D plane by using Low-level Native Plugin Interface methods. At this point I am able to see the Unity editor window itself on the plane as I am currently inside unity editor. But, when I try switch my windows or when I try open any full-screen applications or explorer window in maximized mode or even when I press the windows key(which opens the Start-metro-style ), I am experiencing Unity crash every time. The same behavior is observed in Virtual Reality Mode.
Note : I am able to open other windows or applications in windowed mode and same can be visualized in VR mode as well. But, when I switch to any full screen application or start menu it crashes.
[Environment] Unity 5.3.4f1, Oculus Runtime 0.8, Windows 8.1
And apologies if this issue isn't supposed to be reported on here as my end target is oculus. But, I felt the issue is more of Unity related as it crashes even in Non-VR mode.
Any help would be highly appreciated.
Thanks in advance!
I found the cause for this issue after debugging in my native side code, i.e where the actual Desktop Duplication API's are written. Whenever I used to $$anonymous$$imize my Unity Editor or the build.exe window, the "IDXGIOutputDuplication::AcquireNextFrame " was returning "NULL". I still couldn't find the root cause for this behavior. Even when the "Run in Background" is enabled inside Unity, it still doesn't work! Is there any limitation with using Low-Level Native plugin interfaces?
Your answer
Follow this Question
Related Questions
Native Rendering Plugin with Oculus Rift 0 Answers
Vuforia Image Target for mobile object 0 Answers
Mixamo Animations not working in VR ? 0 Answers
Why does unity editor hang when play button is pressed. 5 Answers