EnoxSoftware / HoloLensWithOpenCVForUnityExample

HoloLens With OpenCVforUnity Example (Support for Hololens1 and Hololens2)
MIT License
262 stars 50 forks source link

Error: 'MatUtils' does not exist in the current context #56

Open tammmyz opened 1 month ago

tammmyz commented 1 month ago

Hello! I am pretty new to Unity and developing for the HoloLens. I have followed the steps in the README up until step 9 where I need to build on Unity. I am running into the following error: Screenshot 2024-06-28 at 12 21 13 PM

I tried looking for a reference to MatUtils within this repo as well as the OpenCVForUnity repo, and online with no success. I am currently using Unity version 2022.3.22f1 on Windows 10.

Wondering if anyone can point me towards a solution for this? Thanks!

EnoxSoftware commented 1 month ago

Thank you for your inquiry. This is due to an older version of OpenCVForUnity. Please try the latest version (2.6.1).

lagenuina commented 3 days ago

Hi, I also have the same error. I am using the latest version 2.6.2, and Unity version 2021.3.42f1

EnoxSoftware commented 2 days ago

Thank you all for your reports. It seems to be affected by the namespace change in the latest version. Assets\HoloLensWithOpenCVForUnityExample\HLCameraStreamToMatHelperExample\ComicFilter.cs, replace line 3 from “using OpenCVForUnity.UtilsModule;” with ”using OpenCVForUnity.UnityUtils;” instead of ”using OpenCVForUnity.