Hello,
i am currently developing a software that uses both bluetooth connection and real time skeleton tracking for medical purposes. In order to make the bluetooth module work, i had to base the project on UWP, however when i run it i get a bunch of errors:
[C:\build\output\unity\unity\Runtime\SceneManager\SceneManager.cpp line -251667336]
UWPPlayerX64 “DESKTOP-NCC3GSV” Perhaps the sensor is already being used in other program. Or some unexpected error.
Does this example work? \bin\nuitrack_sample.exe.
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(String, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:95)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(Exception, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:75)
NuitrackManager:NuitrackInit() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:468)
NuitrackManager:StartNuitrack() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:641)
NuitrackManager:Init() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:270)
NuitrackManager:Awake() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:258)
UWPPlayerX64 “DESKTOP-NCC3GSV” It is recommended to test on AllModulesScene
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(String, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:98)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(Exception, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:75)
NuitrackManager:NuitrackInit() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:468)
NuitrackManager:StartNuitrack() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:641)
NuitrackManager:Init() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:270)
NuitrackManager:Awake() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:258)
UWPPlayerX64 “DESKTOP-NCC3GSV” Also look Nuitrack Troubleshooting page:github.com/3DiVi/nuitrack-sdk/blob/master/doc/Troubleshooting.md
If all else fails and you decide to contact our technical support, do not forget to attach the Unity Log File (https ://docs.unity3d.com/ScriptReference/Debug.Log.html or ADB) and specify the Nuitrack version
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(String, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:101)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(Exception, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:75)
NuitrackManager:NuitrackInit() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:468)
NuitrackManager:StartNuitrack() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:641)
NuitrackManager:Init() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:270)
NuitrackManager:Awake() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:258)
UWPPlayerX64 “DESKTOP-NCC3GSV” System.DllNotFoundException: Unable to load DLL ‘libnuitrack’. Tried the load the following dynamic libraries: Unable to load dynamic library ‘libnuitrack’ because of 'C:\build\output\unity\unity\External\il2cpp\builds\external\baselib\Source\WinApi\Baselib_DynamicLibrary_WinApi.inl.h(36):Baselib_DynamicLibrary_OpenUtf16: Failed to open the requested dynamic library (0x06000000) - Impossibile trovare il modulo specificato. (WinError:0000007e)
at nuitrack.NativeNuitrack.Init (System.String config) [0x00000] in <00000000000000000000000000000000>:0
at nuitrack.Nuitrack.Init (System.String config, nuitrack.Nuitrack+NuitrackMode mode) [0x00000] in <00000000000000000000000000000000>:0
at NuitrackManager.NuitrackInit () [0x000d2] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:357
at NuitrackManager.StartNuitrack () [0x0002b] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:641
at NuitrackManager.Init () [0x00028] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:270
at NuitrackManager.Awake () [0x000b7] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:258
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(String, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:104)
NuitrackSDK.ErrorSolver.NuitrackErrorSolver:CheckError(Exception, Boolean, Boolean) (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\ErrorSolver\NuitrackErrorSolver.cs:75)
NuitrackManager:NuitrackInit() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:468)
NuitrackManager:StartNuitrack() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:641)
NuitrackManager:Init() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:270)
NuitrackManager:Awake() (at C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:258)
UWPPlayerX64 “DESKTOP-NCC3GSV” End showing splash screen.
UWPPlayerX64 “DESKTOP-NCC3GSV” ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00000] in <00000000000000000000000000000000>:0
at NuitrackManager.get_SkeletonTracker () [0x00007] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:86
at NuitrackSDK.Tutorials.RGBandSkeletons.SkeletonController.Start () [0x0004a] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Tutorials\RGBandSkeletons\FinalAssets\Scripts\SkeletonController.cs:26
UWPPlayerX64 “DESKTOP-NCC3GSV” ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00000] in <00000000000000000000000000000000>:0
at NuitrackManager.get_Users () [0x00007] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:106
at NuitrackSDK.Tutorials.RGBandSkeletons.SkeletonController.Update () [0x0000a] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Tutorials\RGBandSkeletons\FinalAssets\Scripts\SkeletonController.cs:34
UWPPlayerX64 “DESKTOP-NCC3GSV” ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00000] in <00000000000000000000000000000000>:0
at NuitrackManager.get_Users () [0x00007] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:106
at NuitrackSDK.Tutorials.RGBandSkeletons.SimpleSkeletonAvatar.Update () [0x0001e] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Tutorials\RGBandSkeletons\FinalAssets\Scripts\SimpleSkeletonAvatar.cs:224
UWPPlayerX64 “DESKTOP-NCC3GSV” ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00000] in <00000000000000000000000000000000>:0
at NuitrackManager.get_Users () [0x00007] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Nuitrack\Scripts\NuitrackManager.cs:106
at NuitrackSDK.Tutorials.RGBandSkeletons.SimpleSkeletonAvatar.Update () [0x0001e] in C:\Users\iotue\OneDrive\Desktop\ENF Dynamic Sport + bluetooth\Progetto Unity\ENF Dynamic Sport + bluetooth\Assets\NuitrackSDK\Tutorials\RGBandSkeletons\FinalAssets\Scripts\SimpleSkeletonAvatar.cs:224
[…keeps repeating the same errors forever]
Device: ORBBEC Astra 2
Nuitrack: ver 3722
Unity: 2022.3.13f1
.NET Framework: ver 4.7.1
Windows 11
so, about the first error, sensor works fine in non-UWP builds and of course on the nuitrack-sample.exe; the others, however, i have no idea.
I have read that Nuitrack at the moment does not support UWP but i tried anyway checking the environmental variables, and both Path and NUITRACK_HOME are set correctly; i tried settings the .DLL/plugins nuitrack.net.dll to “All platforms” and it didnt’ work; i also tried to set only UWP as platform but still nothing; i also tried going in the solution explorer and setting nuitrack.net.dll advanced properties to “content” and “copy if new” (this, however, helped me to build the project in the first place as before this unity kept telling me that i was missing assembly references); lastly i tried copying the whole “managed” folder from the windows-linux unity build (that works) that contains all the .dll and drivers but of course it didn’t work.
So, is there a solution? Basically what i want to achieve is making Nuitrack work in UWP projects.
Thank you in advance