# ZED sdk for Unity is unable to recognize that OpenCV is installed in the Unity Project

**URL:** <https://community.stereolabs.com/t/zed-sdk-for-unity-is-unable-to-recognize-that-opencv-is-installed-in-the-unity-project/11702>\
**Category:** Unity\
**Tags:** unity\
**Created:** [September 4, 2026, 5:13pm UTC](https://community.stereolabs.com/t/zed-sdk-for-unity-is-unable-to-recognize-that-opencv-is-installed-in-the-unity-project/11702 "2026-09-04T17:13:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsobus](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@dsobus](https://community.stereolabs.com/u/dsobus)\
**Post date:** [September 4, 2026, 5:13pm UTC](https://community.stereolabs.com/t/zed-sdk-for-unity-is-unable-to-recognize-that-opencv-is-installed-in-the-unity-project/11702/1 "2026-09-04T17:13:00Z")

</div>

I am trying to run the sample scene “Simple Marker Placement” from the ZED SDK for Unity, but I am unable to get the ZED SDK to recognize that OpenCV is installed in the project. In the past, I have been able to get these two SDKs to work in various projects, so I am not sure where the current issue is coming from.

My current set up is:

- OS: Windows 11
- Unity Version: 600.3.9f1
- ZED SDK Version: 5.4.1
- ZED SDK for Unity Version: 5.4.0
- OpenCV for Unity Version: 3.0.3 (paid version)
- Target Build Platform: Windows

I’ve attached a screenshot of the [StereoLabs](https://www.stereolabs.com/).Zed Assembly Definition Asset. In the past, adding EnoxSoftware.OpenCVForUnity to the Assembly Definition References has resolved this issue, but that solution no longer seems to work. I’ve also attached a screenshot of the warning message and a snippet of the code from ZEDArUcoDetectionManager.cs showing that #if ZED\_OPENCV\_FOR\_UNITY doesn’t equate to true so the code stays unactive

 ![Screenshot 2026-09-04 101400](https://community.stereolabs.com/uploads/default/original/2X/c/cab85a0d12deec8f1786ce0ce34139637d206d23.jpeg)

 ![StereoLabs_plugin](https://community.stereolabs.com/uploads/default/original/2X/a/a323f81e2d1fec328d81b8801328d40a70ae63d0.jpeg)

 ![CodeSample](https://community.stereolabs.com/uploads/default/original/2X/6/67f253dff81087a6bc3b8d167764fa4c7c82b476.png)

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [September 4, 2026, 5:49pm UTC](https://community.stereolabs.com/t/zed-sdk-for-unity-is-unable-to-recognize-that-opencv-is-installed-in-the-unity-project/11702/2 "2026-09-04T17:49:22Z")

</div>

Hi @dsobus  
Welcome to the [StereoLabs](https://www.stereolabs.com/) community.

> [@dsobus](#):
>
> I’ve attached a screenshot of the [StereoLabs](https://www.stereolabs.com/).Zed Assembly Definition Asset. In the past, adding EnoxSoftware.OpenCVForUnity to the Assembly Definition References has resolved this issue, but that solution no longer seems to work.

The assembly reference is required, but it is not what sets the symbol, so it cannot fix this alone. In plugin 5.4.0 the `ZED_OPENCV_FOR_UNITY` symbol is managed by `ZEDDefineHandler.cs` (`SDK/Helpers/Scripts/Utilities/`). It runs on every domain reload and after every asset import, and it looks for a **loaded assembly whose name is exactly** `opencvforunity`:

csharp

```auto
const string OpenCVAssemblyName = "opencvforunity";
...
if (assembly.GetName().Name.Equals(name, System.StringComparison.OrdinalIgnoreCase))

```

If the assembly has a different name, for example `EnoxSoftware.OpenCVForUnity` as used by recent OpenCV for Unity releases, the comparison fails, so the define is never added; worse, `RemoveDefine()` strips it from the Player Settings if you add it by hand. This matches exactly the symptom you observe with OpenCV for Unity 3.0.3.

> [@dsobus](#):
>
> #if ZED\_OPENCV\_FOR\_UNITY doesn’t equate to true so the code stays unactive

Two things to check and one workaround:

1. Select the OpenCV for Unity Assembly Definition Asset and read its **Name** field (or check the DLL name in `Library/ScriptAssemblies/`). That is the string the handler must match.
2. Make sure the reference is added to the assembly that actually contains `ZEDArUcoDetectionManager.cs`. When the samples are imported from the Package Manager, that is `Stereolabs.Zed.Examples`, not `Stereolabs.Zed`.
3. Patch the handler. Since the plugin comes as a UPM package, copy it from `Library/PackageCache/com.stereolabs.zed@.../` into your `Packages/` folder to make it editable (or add it as a local package from a clone of [GitHub - stereolabs/zed-unity: ZED SDK Unity plugin · GitHub](https://github.com/stereolabs/zed-unity)), then either set `OpenCVAssemblyName` to the real name, or relax the test:

```auto
if (assembly.GetName().Name.IndexOf("opencvforunity", System.StringComparison.OrdinalIgnoreCase) >= 0)
    return true;

```

Note also that the symbol is written only for the active build target group, so keep the target platform on Windows while the Editor performs the check.

I am reporting the assembly name matching internally so that the detection becomes robust to the OpenCV for Unity 3.x naming in a next plugin release.

For reference, the tutorial for this sample is here: [Using OpenCV in Unity | StereoLabs](https://www.stereolabs.com/docs/integrations/unity/using-open-cv-with-unity)

Please let me know the assembly name you find, it will help us to fix the check properly.

---

<div class="post-metadata">

**Author:** ![dsobus](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/d/97f17d/32.png) [@dsobus](https://community.stereolabs.com/u/dsobus)\
**Post date:** [September 7, 2026, 5:24pm UTC](https://community.stereolabs.com/t/zed-sdk-for-unity-is-unable-to-recognize-that-opencv-is-installed-in-the-unity-project/11702/3 "2026-09-07T17:24:18Z")

</div>

Thanks for your help! Updating the assembly name in the handler worked. The current assembly name for OpenCV is EnoxSoftware.OpenCVForUnityExample
