Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Unity Plugin (RealSense Original Project) | NullReferenceException

Michael_M_7
Beginner
1,537 Views

Hello Devs,

I'm trying to run RealSense's Unity project (Original) but when I do, the "game" ends up with NullReferenceException:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.DockArea.OnGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/GUI/DockArea.cs:601)
PXCMSenseManager:PXCMSenseManager_Init(IntPtr, IntPtr)
PXCMSenseManager:Init(Handler)
PXCMSenseManager:Init()
HandsViewer:Start() (at Assets/Scripts/HandsViewer.cs:57)

 

I repeat, it's RealSense's original Unity project contained in "C:\Program Files (x86)\Intel\RSSDK\framework". I did not interfere with any of its scripts!

Any thoughts what would the problem might be? My rig btw is: i7 5820K | 16GB Ram DDR4 | GTX970 | Win 8.1 x64 | Unity 4.6.1p3

RS Camera is there, RS SDK is installed (full installation, latest version) and everything seems ok!

 

Thanks in advance :)

0 Kudos
1 Solution
MartyG
Honored Contributor III
1,537 Views

I had this error myself.  If I remember right,people who run the sample programs from the C:/Program Files folder were having problems with them because the samples want to write data to the hard disk but the C:/Program Files folder is protected and doesn't allow programs to write to them (it's a security measure).  Therefore, the sample programs fail.

Intel recommend running all the sample programs from the Sample Browser application supplied with the SDK. When you install the SDK, it creates a separate folder from the RSSDK folder that has the browser in it.  I believe it should be in the list of folders in yur Windows start menu, under the name 'Intel RealSense SDK 2014'.

An alternative way to beat the errors is to install the SDK to C: instead of C:/Program Files.  So the location will be C:/Intel/RSSDK.  When you do this, the read-write errors caused by the Program Files folder no longer occur.

Good luck!

View solution in original post

0 Kudos
3 Replies
MartyG
Honored Contributor III
1,538 Views

I had this error myself.  If I remember right,people who run the sample programs from the C:/Program Files folder were having problems with them because the samples want to write data to the hard disk but the C:/Program Files folder is protected and doesn't allow programs to write to them (it's a security measure).  Therefore, the sample programs fail.

Intel recommend running all the sample programs from the Sample Browser application supplied with the SDK. When you install the SDK, it creates a separate folder from the RSSDK folder that has the browser in it.  I believe it should be in the list of folders in yur Windows start menu, under the name 'Intel RealSense SDK 2014'.

An alternative way to beat the errors is to install the SDK to C: instead of C:/Program Files.  So the location will be C:/Intel/RSSDK.  When you do this, the read-write errors caused by the Program Files folder no longer occur.

Good luck!

0 Kudos
Michael_M_7
Beginner
1,537 Views

Hi Marty,

I did what you said and opened/run the project from the SDK Sample Browser. The problem is still there tho. I click "play" and there it is. NullReferenceException all over the place. I'll do the alternative you suggested, I'll install it to C: directly. I'll come back to you whether it works or not.

 

Thank you.

0 Kudos
Michael_M_7
Beginner
1,537 Views

Okay Marty, it worked... Installing the SDK to C: fixed the problem! Thank you very much, you saved me big time! :)

0 Kudos
Reply