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
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
- Enabling “Editor Extension Authoring” in UI Builder doesn’t dirty the document and saving with shortcut doesn’t persist the state
- WebRequest.Create() function fails with "URI prefix is not recognized" errors when the project is built for Linux Standalone or Windows Dedicated Server
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/