Unity3d - Failed to load 'Assets/Plugins/QCARWrapper.dll'

独自空忆成欢 提交于 2019-11-26 22:04:20

问题


I want to use c++ dll on unity android application. To use native dll on a android device, I learn that I should use Unity 5. I download unity5 from here. My application requires vuforia. So I download vuforia package from here.

Unity 5 is 64 bit.

On unity editor, I delete MainCamera and add ARCamera. There is an error message on unity console. The message is below :

Failed to load 'Assets/Plugins/QCARWrapper.dll', expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386.
Vuforia.WebCamAbstractBehaviour:CheckNativePluginSupport()

There is a solution for this problem on vuforia forum. But I don't find unity editor(32 bit)


回答1:


To use Vuforia with Unity 64 bit, just move the QCARWrapper DLLs from /Plugins to /Plugins/x86. These are the DLLs:

  • QCARWrapper.exp
  • QCARWrapper.lib
  • QCARWrapper.dll
  • QCARWrapper.dll.signature

This should solve the problem!




回答2:


Go to https://unity3d.com/get-unity/update Under there, you will see ADDITIONAL DOWNLOADS Under that you will see FOR WINDOWS. Click it and choose Unity Editor (32-bit).

EDIT: I see lots of dowvotes. This was the ONLY solution when this question was asked. Unity 5 64bit just got released when this question WAS asked and this was the ONLY solution back then. This answer was changed to the current answer that was provided 5 months later when Vuforia released 64bit version of their plugin.




回答3:


Vuforia 5.0 supports the 32bit version of the Unity Editor on Windows, and the 64bit version on Mac.

So, There are two possible solutions:

  1. you just need to install and use the Unity 5 32bit Editor, on Windows.

OR

  1. Create a new folder "x86" inside

    Assets>>Plugins

    inside your unity project structure Then move the following files from "Plugins" to newely created "x86" folder.

    • QCARWrapper.lib
    • QCARWrapper.dll
    • QCARWrapper.dll.signature
    • QCARWrapper.exp

After that check log message, If you see the log like:

Setting platform to 'Editor' for plugin: Assets/Plugins/x86/VuforiaWrapper.dll
UnityEngine.Debug:Log(Object)
Vuforia.EditorClasses.ExtensionImport:UpdatePluginSettings() (at Assets/Vuforia/Editor/Scripts/ExtensionImport.cs:43)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Then , Congrats !! You are ready to Go!




回答4:


I had the same problem /Failed to load 'Assets/Plugins/QCARWrapper.dll'/ with vuforia plugin and latest version of Unity ( currently 5.1.2f 64bits ) and also couldn't get my laptop camera to work.

Everything is fixed with the 32 bit release of Unity, even if my os is 64 bits (Windows 7).




回答5:


If you are using Unity 5.1, make sure to set the right Graphics API settings in the Player Settings for Android and iOS:

disable the "Automatic Graphics API" checkbox in the Graphics APIs list, make sure that only OpenGL ES 2.0 is included: Android: remove OpenGL ES 3.0 iOS: remove OpenGL ES 3.0 and METAL

Important : 1. In your Unity project:

Select the QCARWrapper.bundle in the Unity Project view (located under Assets > Plugins ), so that its settings are shown in the Unity Inspector Change the settings of QCARWrapper.bundle in the Unity inspector from "Any Platform" to "Standalone + Editor".

Rebuild

​OR:

  1. In the Xcode project generated by Unity:

Go to Build Phases > Copy Bundle Resources Remove the QCARWrapper.bundle file from the list Rebuild

My unity3d version is 5 and 64bit ,Os is Windows7 64 bit.

my Problems solved .

Edit :

Unity editor couldn't show laptop camera ,But Rebuild Project , camera work . for example rebuild Android platform , and install .apk on device => application Ok .




回答6:


Go to Name_Vuforia_Unity_Project\Assets\Plugins and you will find QCARWrapper.dll.

Delete it and try again (could be necessary to restart unity).

Unity 64 bit



来源:https://stackoverflow.com/questions/30119423/unity3d-failed-to-load-assets-plugins-qcarwrapper-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!