I reference the Intel.RealSense.Unity and Intel.RealSense.Scan.Unity in My Unity project. and , when I build my project in VS 2015,i got following warning:
warning MSB3270: There was a mismatch between the processor architecture of the project being build "MSIL" and the processor architecture of the reference "Intel.RealSense.Unity", "x86".
warning MSB3270: There was a mismatch between the processor architecture of the project being build "MSIL" and the processor architecture of the reference "Intel.RealSense.Scan.Unity", "x86".
how can i fix?
链接已复制
Unity 5 is 64 bit (x64). This is why 64-bit RealSense library files (DLL) need to be used with Unity in order for the camera to work. You should also set your project's build to use x64 architecture instead of x86, otherwise you can get the message that you showed. You can do this with the 'build architecture' drop-down menu on the Build Settings window. You can find this window in Unity 5 with File > Build Settings.
What I meant was that there does not seem to be separate x86 and x64 versions of Intel.RealSense.Unity.dll, just the one file that you found. For this file, x86 or x64 does not seem to matter.
When you look at the error message that you posted, 'Intel.RealSense.Unity' and 'x86' are in separate quotation marks - they are not part of the same file name. This suggests to me that your problem is probably that you have 'x86' set in the Architecture menu in the Build Settings window, and you should change that menu to say 'x64'
do you mean that your program runs okay in the editor mode but when you do a full Build and Run test, the program crashes? This is another symptom of the Architecture menu in Unity being set to x86. For some strange reason, Unity sets it by default to x86 even though Unity 5 is 64-bit software. I suppose it is to provide backward compatibility with programs made in Unity 4.
I please need to know what your Unity 'Architecture' menu is set to. So please follow these steps.
1. In Unity, please go to the File menu and select the 'Build Settings' option.
2. On the build Settings window, open the 'Architecture' menu. If it says 'x86', please change it to 'x86_64'.
3. Run your program and see if your problem has been fixed.
My experience is that whenever somebody tries to write their own code to initialize the Sense Manager, the program often crashes. It is not an easy script to write!
I do not know enough about Sense Manager programming to debug it, as I have always used the Unity Toolkit that comes packaged with the RealSense SDK. This creates a Sense Manager in your project for you when a RealSense script is run, so that you do not have to write your own Sense Manager creation script.
