8 Replies Latest reply on Feb 9, 2018 11:09 AM by MartyG

    D400 Unity plugin broken on OSX?

    RGBDude

      I just downloaded the latest version of the SDK from Github and I'm getting this error several times:

      error CS0246: The type or namespace name `Intel' could not be found. Are you missing an assembly reference?

      Does anyone have any idea why the plugin isn't working out of the box? Latest version of Unity, it's an empty scene and the D435 is plugged in.

        • 1. Re: D400 Unity plugin broken on OSX?
          MartyG

          May I please confirm with you if the Unity plugin files have been installed in your Unity project and in the correct locations?  On my Windows installation of the SDK (I do not have a Mac to check the location on), the files are located in this SDK 2.0 folder:

           

          Intel RealSense SDK 2.0 > bin > x64

           

          The plugin files that Unity needs are called LibrealsenseWrapper.dll and realsense2.dll.

           

          You should go to your Unity 'Assets' panel, locate the folders 'Plugins' and 'Plugins,Managed' and do the following:

           

          1.  Drag and drop the realsense2.dll file from its original SDK folder into Unity's Plugins folder

          2.  Drag and drop the LibrealsenseWrapper.dll file from its original SDK folder into Unity's Plugins.Managed folder

           

          After these steps are completed, you can then open a Unity scene.

          • 2. Re: D400 Unity plugin broken on OSX?
            RGBDude

            I download the SDK 2.0 off of Github, but the Unity project does not have the 'Plugins' or 'Plugins.Managed' folders. I don't see the bin folder anywhere, and looking through the github I don't see it anywhere there either.

             

            Why would Intel post incomplete code like this?

            • 3. Re: D400 Unity plugin broken on OSX?
              MartyG

              As I do not have a Mac, I cannot check the folder structure of the SDK installation on your machine.  Would it be possible to put the name of one of the files into a search box on your SDK folder and find the files that way?

              • 4. Re: D400 Unity plugin broken on OSX?
                RGBDude

                The folder structure is here: GitHub - IntelRealSense/librealsense: Intel® RealSense™ SDK

                 

                It's not there when I search my computer or the repository.

                • 5. Re: D400 Unity plugin broken on OSX?
                  MartyG

                  Apologies for the delayed response.  I was thoroughly researching your case.

                   

                  It seems that you get the Realsense2.dll file by building the RealSense SDK 2.0 source, and then get the LibrealsenseWrapper.dll file by going to the wrappers/charp section of the SDK structure and building the file Intel.RealSense.SDK.sln

                   

                  The Wrappers > Csharp section of the SDK structure:

                   

                  librealsense/wrappers/csharp at master · IntelRealSense/librealsense · GitHub

                   

                  At this point there is a problem though.  It says that the solution (sln) file only currently works with Windows.  So I am not certain how you would gain that file with a Mac.  The best I can think of is to attach the two DLL files to this message, which I have done, so you can try importing them into the Plugins and Plugins.Managed folders in Unity.

                   

                  Regarding not having Plugins / Plugins.Managed folders in your Unity project: I started a new project to check this and confirmed that a new project did not have these folders.  So simply create these folders in your Assets windows and place the DLLs in the appropriate folder according to the instructions.

                  • 6. Re: D400 Unity plugin broken on OSX?
                    RGBDude

                    That is fantastic, I appreciate all of your help. Do you work for Intel?

                     

                    It still perplexes me that these files are not already included in the Unity project. Why don't Intel just include a .unitypackage file like they did with the old realsense SDK, and like every other SDK developer does?

                     

                    It seems needlessly complicated and will likely turn away many developers.

                     

                    Thank you again.

                    • 7. Re: D400 Unity plugin broken on OSX?
                      RGBDude

                      Unfortunately it still does not work on OSX.

                      DllNotFoundException: realsense2

                      Intel.RealSense.Colorizer..ctor ()

                      ColorizeDepth..ctor () (at Assets/RealSenseSDK2.0/Scripts/ColorizeDepth.cs:9)

                      LibrealsenseWrapper.dll has support for OSX x64, but realsense2.dll is Windows only.

                      • 8. Re: D400 Unity plugin broken on OSX?
                        MartyG

                        I'm glad I could be of help.    I am not an Intel employee, I am a volunteer support guy known as a 'Super User'. 

                         

                        Yes, a pre-made package file in the style of the old Unity Toolkit executable would be very useful.  As it would have to be updated with a new Realsense2.dll every time a new SDK build was released though in order to reflect the latest changes in the SDK, this may be more trouble than when the old Windows SDKs were updated on a roughly 6 month schedule.   The simplest approach may be to put download links for the latest versions of these two DLLs on a web page, since Intel will have to build the files anyway for the binary version of the SDK.

                         

                        I just saw your latest message.  It is a positive at least that LibrealsenseWrapper.dll is the one that works with Unity, as that is the one that is potentially the most complicated to build for Mac.  You should be able to obtain realsense2.dll in theory just by building the SDK 2.0 on yur Mac.  Whether that Mac-built DLL will work in Unity, I cannot say.