Software Archive
Read-only legacy content
17061 Discussions

Unity problems with SDK R5(v7)

christopher_b_3
Beginner
1,277 Views

New SDK seems to have broken some stuff while using Unity.

1) Speech Synthesis stopped working. The following line of code now fails with PXCM_STATUS_DEVICE_UNAVAILBLE

mStatus = mSession.CreateImpl<PXCMSpeechSynthesis>( out mSpeechSynth );

2) Scene perception stopped working

QueryTrackingAccuracy() returns LOW and SenseManager.QueryScenePerception().CheckSceneQuality() is always returning -2.0

I noticed this warning when I load up Visual Studio debugger ( I'm using a 64-bit machine ):

Warning        There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "libpxcclr.unity", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.    RealSenseUnity.CSharp        

 

0 Kudos
6 Replies
christopher_b_3
Beginner
1,278 Views

After more debugging, I am able to get scene perception working. It appears the behavior has changed.

I need to be MUCH closer ( < 1 ft ) to something before scene quality will kick in and start pushing mesh data.

And it seems to lose tracking alot easier as well. I prefer behavior from last SDK.

Speech Synthesis still borked though.

0 Kudos
christopher_b_3
Beginner
1,278 Views

Oh, I also rebuilt the libpxcclr.unity dll and I no longer get that warning. Can't remember what original values were for some of the build settings, but when I built for x64 I would get same warning as above except "AMD" instead of "x86". Then changed to Any CPU to get no warning.

Also, I changed the Target Framework to Unity 3.5 .net full Base Class libraries in order to link in the UnityEngine dll. 

0 Kudos
Lucas_M_2
Beginner
1,278 Views

Hey Christopher,
Good that you managed to solve your problem. But you told me on the other topic, you are also having a Intel HD driver crash with the new SDK, could you manage to solve that too?

0 Kudos
christopher_b_3
Beginner
1,278 Views

Lucas,

I am still seeing that HD driver crash. Although I am not sure yet what is responsible. Could be Win10, Unity ( 5.3.0f4 ) , or new Real Sense SDK. I will keep you posted if I narrow it down.

0 Kudos
MartyG
Honored Contributor III
1,278 Views

I had the same issue with the processor architecture mismatch error that Chris did when Unity5.2  introduced Visual Studio integration.  Like Chris, I found at the time that the solution was to switch the architecture setting to 'Any CPU'. Here's a link to the guide I wrote about it back then.

https://software.intel.com/en-us/forums/realsense/topic/592461

In that guide, I found that (at the time of writing, at least), Visual Studio was not a good fit for script-editing in Unity, because it was generating errors about Unity-specific script functions and formatting that Visual Studio did not understand.  Visual Studio is an optional component when installing Unity which you can untick.  Doing so makes MonoDevelop the default script editor instead, which I find is far easier to work with. 

If you have already installed Unity recently with the Visual Studio component and do not want to uninstall Visual Studio and then re-install Unity without VS, you can switch back to MonoDevelop from within Unity using the method shown at the bottom of the article I linked to above.

0 Kudos
christopher_b_3
Beginner
1,278 Views

With regards to Scene perception not working.

It turns out I had a newer version of R200 DCM : 2.1.4.592  as opposed to 2.0.3.53109.

I'm unsure of how the newer version got on my machine, though I may have done the optional step

of installing SDK Runtime Distributable.

0 Kudos
Reply