I’m building a UDP video stream decoder for the Hololens 2 in Unity 2021. I’ve compiled FFmpegInteropX for ARM64 UWP, however I’m having issues setting it up within Unity. With the binaries included in /Plugins/WSA
I get the following error:
ArgumentException: The Assembly WinRT.Runtime is referenced by FFmpegInteropX.DotNet ('Assets/Plugins/WSA/FFmpegInteropX.DotNet/Release/FFmpegInteropX.DotNet.dll'). But the dll is not allowed to be included or could not be found.
I’ve wrapped all of my WinRT dependent code with the appropriate preprocessor directive as shown here, and I’ve also set all my plugins to target WSAPlayer and UWP.
#if ENABLE_WINMD_SUPPORT
using FFmpegInteropX;
using WinRT;
using Windows.Foundation;
using Windows.Media.Core;
using Windows.Media.Playback;
using System.Threading.Tasks;
#endif
If I include WinRT.Runtime.dll
in the plugins folder, the issue spreads asking for more dependencies then the new dependencies (such as Microsoft.Windows.SDK.NET.dll
) starts conflicting with the MRTK packages due to it also depending on WinRT.
How can I use this library within Unity without constantly running into dependency hell?