Nuitrack works on Unity Editor, but not when building the game

image

Again the same issue as many faced.

1.Using unity 2019.4.12
2. intel realsense d455 (the viewer works) (sdk- latest)
3. nuitrack (trial licenses, activation tool and nuitrack_sample works)
4.windows 10

I have done all things according to the docs, set all paths, I successfuly run BasicSkeleton example scen in the Editor.

When i built it for an 64 bit device i recieve the above exception inside the NuiTrackManager script at the niutrack.Run function.
Why is that happening?

The only think I am not sure i have done it correctly is that according to the docs you should copy .bin., .data, and .middleware folder into your <app_dir> and then give the path “<app_dir/data/nuitrack.config>” in Init()

For the <app_dir> i have chosen the forlder of the project where assets, library, project settings,… are

I have similar problem here:

It’s just me talking by myself there, so don’t get excited. So far no word from the devs (18 days and counting).
But I’m watching this thread if something useful happens.

Do you have the trial version?

Yes. Works perfectly in editor on other computer though.

Do you think if I purchase the pro version may get results when building an .exe?

I don’t know. Only the 3DiVi staff can answer to that. I’ve been merely evaluating the sdk’s capabilities in trial version before our company makes a decision. So far it seems there are better alternatives with more responsive support.

1 Like

I think we have a different issue here.
Where did you paste the .bin, .data and .middleware folder that you copy from nuitrack?
Into you project folder, into your build folder, asset folder???

I copied the contents of the bin folder in the project root folder (i.e. same folder where library, assets etc are).

In build, I copied the files to root folder as well (where the .exe resides).

I did not copy files from other folders. Do think some of those files are needed?
Copying same files to each app’s folder is not really acceptable solution in the long run, but at this point I’m willing to make compromise if some kind of temporarily solution is found out.

after copying those 3 folder into your build folder did you check if your .config file or the string parameter in nuitrack.Init() function had the right path to read the necessary data?

1 Like

I copied only contents of the bin folder and It works in editor and in build on the same computer, but did not work on other computer with same runtime version installed.

That being said, the build suddenly started working again. The other pc has been unused and even the windows update is disabled so no clue what’s happened.

Wait you copied only the bin folder into your build direcory?
The other two are still into your project directory?

Yes, only the contents of the bin directory.

No, they are only in the program files / nuitrack / etc… where the nuitrack runtime is installed.

Are you sure this is required for Unity builds? There no mention about linking in the Unity tutorials. Also my Unity build works on the development pc without doing any of these steps.

In the editor it is working properly because I copied all of these and vhange the .config file as the documentation says.

When building an .exe file it crasches giving an error in Nuitrack.Run() command while all the dll are properly initialized.

So you have managed to make a build in one desktop and not to another?

Hello @ctheodorak . Sorry for the long answer.
I think it better to start from the beginning.
Try to create a new project and follow the instructions in this tutorial https://github.com/3DiVi/nuitrack-sdk/blob/master/doc/Unity_Basic.md
For Unity, everything is much simpler and you do not need to copy any folders to the project (and most likely you do not need to edit the nuitrack.config)

Please let me know if you have any other questions.

Also maybe here is a solution to a similar problem Unity + Nuitrack/realsense build not working

Hello thanks for the answer.

Well at first I want to build an .exe nothing relate to an android project so your tutorial in your page (please) MUST be more flexible and change.

I have done the same action by install and activating realsense d455 and nuitrack latest version
Following the instuctions from nuitrack documentation on github and it plays again in unity editor 2019.4 (I have all my specs above).
When I build an .exe file code crashes at nuitrack.Run() , meaning that ddl are correctly initialized but somethis is going on probably with d455 and your sdk on windows 10 unity build.

May I ask why you ponted me at an android tutorial and can you help me solve thsi issue?

Although the tutorial says “android”, in fact, it is universal. And it should work both in the editor and in the Windows application.
Let’s try to figure out what the problem is.
Run the allModulesScene in the editor with the connected sensor. And, if it works, then build the application with this scene and report the error on the screen.