Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4
2019.4.21f1
2020.2
2020.3
2021.1
2021.2
Issue ID
1318593
Regression
No
[UWP] Build using managed plug-ins is inoperative
How to reproduce:
1. Open the attached "miner.zip" project
2. Build and run to UWP (with Development Build turned on)
Expected result: Build using managed plug-ins is working as intended
Actual result: Build using managed plug-ins is inoperative (there is also an error "invalidoperationexception: Sequence contains no matching element" in Development Console)
Reproducible with: 2019.4.22f1, 2020.2.7f1, 2020.3.0f1, 2021.1.0b10, 2021.2.0a8
Not reproducible with: 2018.4.32f1 (other errors when building)
Notes:
- The issue is not reproducible on Standalone build
- The issue is not reproducible in Editor
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on GfxDeviceD3D12::AllocBottomLevelAccelerationStructure when using Raytracing
- The search icon in the "Searches" sections is blurry and inconsistent
- "RenderingCommandBuffer" error is thrown when switching to the tvOS platform
- Left side cog menu button is obstructed by the maximum Y value of the graph when editing a curve in the Particle System Curves
- "Property exceeds previous array size (64 vs 32)." warnings are thrown when switching from tvOS platform to a Standalone platform after restarting the Editor
Resolution Note (2021.2.X):
Not a Unity bug.
The issue is caused by this runtime exception: System.DllNotFoundException: Unable to load DLL 'OpenCL.dll'. UWP isn't allowed to open system libraries at runtime, i.e. OpenCL.dll, but can only use libraries included in the Appx package.
While you can use OpenCL for UWP, you cannot use managed wrappers (like Cloo) to P/Invoke into system libraries. Instead you'll need to use Microsoft packages which integrate OpenCL with DX12: https://github.com/microsoft/OpenCLOn12
See also:
https://devblogs.microsoft.com/directx/announcing-the-opencl-and-opengl-compatibility-pack-for-windows-10-on-arm/