luxonis / depthai-unity

DepthAI Unity Library, Unity projects and examples (OAK For Unity)
MIT License
200 stars 34 forks source link

Device not detected on unity #42

Closed Gangwa-Labs closed 11 months ago

Gangwa-Labs commented 1 year ago

When running the depthai URP project I am getting no complier errors but the Oak device manager isn't picking up any devices. When checking the connected usb devices through system information the movidius chip shows up as connected to one the USB hubs.

I am using the Oak D Pro W

here is the error that I get when I open the hamburger menu to see if the oak device is connected: DllNotFoundException: depthai-unity assembly: type: member:(null) OAKForUnity.UIMenuManager.CheckForDevice () (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:310) OAKForUnity.UIMenuManager.CheckForDeviceWorker () (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:319) System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at :0) System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at :0) System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at :0) System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at :0) System.Threading.ThreadHelper.ThreadStart () (at :0) UnityEngine.<>c:b__0_0(Object, UnhandledExceptionEventArgs) OAKForUnity.UIMenuManager:GetAllDevices() OAKForUnity.UIMenuManager:CheckForDevice() (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:310) OAKForUnity.UIMenuManager:CheckForDeviceWorker() (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:319) System.Threading.ThreadHelper:ThreadStart()

gespona commented 1 year ago

Hi @Gringl , seems the issue is loading the DLL depthai-unity

DllNotFoundException: depthai-unity

Could you share more information about you HW/OS specs. Are you just trying from fresh clone of repo? Could you check DLL is present under folder: Assets/Plugins/OAKForUnity/NativePlugin/xxxx/ ?

IJsLauw commented 1 year ago

Hm, I can confirm there is no dll or even a macos folder in the NativePlugin folder.

gespona commented 1 year ago

Hi, yes if you're targeting MacOS, there is no pre-compiled library (yet)

You need to compile it, following the instructions here: https://github.com/luxonis/depthai-unity/blob/build_unity_lib/docs/Build_unity_lib.md

LMK if you have any issue

@IJsLauw @Gringl

gespona commented 11 months ago

Closing ticket. Reopen if needed.