- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The folder structure is here: https://github.com/IntelRealSense/librealsense GitHub - IntelRealSense/librealsense: Intel® RealSense™ SDK
It's not there when I search my computer or the repository.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/csharp 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did anyone get this working? In the same situation and hitting the same error posted in the most recent reply: DllNotFoundException: realsense2
Tried building the lib directly from the XCode project but doesn't seem to work. Can get everything to work on Linux but not OSX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually I spent some more time on it and it looks like I just needed to rename the native library I built from the XCode project from realsense2.dylib to realsense2.bundle so Unity would recognize it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's amazing you got it working! I'd would be wonderful if you could share the dylib.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sure. I've attached the libs I'm currently using. The managed wrapper and the MacOS native bundle. Compiled for .NET 4.6.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually the ones I posted were for SDK version 2.10.1. I'm attaching the ones for the latest SDK version 2.12.0.
Here are the rough steps I took to compile them. They may not all be necessary but this is what worked for me.
- Open XCode project and build librealsense2 target for Release.
- Copy built dylib to Unity project in Plugins directory and rename to realsense2.bundle
- Open wrappers/csharp/Intel.RealSense/Intel.RealSense.csproj
- Delete/comment out target element
- Delete/comment out 'DependsOnTargets="EnsureBitCorrectness"' attribute in "IncludeDependencies" target element.
- Change 'realsense2.dll' in following line to point to built dylib file name from above:
- ..\..\..\build\$(Configuration)\realsense2.dll
- Open wrappers/csharp/Intel.RealSense.SDK.sln in .NET IDE
- Build Intel.RealSense project for Release.
- Copy Intel.RealSense.dll in bin/x64/Release/net461 to Unity project in Plugins directory (or whatever .NET framework you want to target). If you use .NET 4.6 you need to switch to that scripting engine in the Player settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for sharing this. I'm still getting the following error
"
Assets/RealSenseSDK2.0/Scripts/AlignImages.cs(2,7): error CS0246: The type or namespace name `Intel' could not be found. Are you missing an assembly reference?
Could you share your folder structure for your Unity Assets folder?
Are both DLLs inside your Plugins folder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I just put them both in the Plugins folder. It should work with the folder structure of the Unity project included in the SDK if you just add the Plugins folder and put the libs in there. If you're using the libs I posted, did you switch to .NET 4.x scripting runtime in the player settings? I only posted the 4.6 libs. The managed dll needs to match the .NET target of the scripting runtime. I'm attaching the .NET 3.5 version if you're trying to use that.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page