Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

VideoCapture stopped working with IL2CPP backend

Discussion in 'Windows Mixed Reality' started by EdgarSantos, May 27, 2019.

  1. EdgarSantos

    EdgarSantos

    Joined:
    Nov 11, 2013
    Posts:
    23
    Hi,

    The sample code provided here https://docs.unity3d.com/2018.3/Documentation/ScriptReference/XR.WSA.WebCam.VideoCapture.html

    always worked with .NET scripting backend, but stopped working with IL2CPP with an exception thrown in the
    "StartRecordingAsync" method:
    ArgumentException: The specified directory does not exist.
    Parameter name: filename

    The path to which we're saving the video is confirmed to be the same in both .NET and Il2CPP, and it's the exact same project (permissions, sdk build settings, etc).

    Does anyone knows how to overcome this issue? We tried Unity 2018.3.14 and 2018.4.
    We don't want to continue working with .NET backend because of hologram instability issues that we already reported to Unity and to which there's no solution, as far as we know. Furthermore, it seems .NET backend support was dropped in Unity 2019.

    I'm also submitting a bug report with a simple example project reproducing this issue but our app is currently "stuck" because of this. Going back to 2017LTS (the only version of Unity in which the holograms were stable with .NET backend) is not an option. Not being able to record videos is also not an option. Using the MediaCapture API works but encoding each frame to save it to disk is slow, not to mention the necessary video encoding after.

    Any help is appreciated.
    Thank you.