简体   繁体   中英

Unity + Leap Motion: error CS0246 (namespace) issue

We have a Unity 5 program running well with Oculus Rift + Leap Motion on a Windows 7 computer. We tried to have the same program running on another computer with Windows 10, but these following errors showed up.

Could any of you provide some suggestions? Thanks a lot! (ps. Oculus Rift and Leap Motion are running well on the Win10 computer with a separate Unity project: the package called "Core Assets" from Leap Motion that shows both Oculus and Leap Motion connections.)

Thanks!

The error messages in Unity are:

Assets/LeapMotion/Scripts/Hands/DebugFinger.cs(14,28): error CS0246: The type or namespace name `FingerModel' could not be found. Are you missing a using directive or an assembly reference?

Assets/LeapMotion/Scripts/Hands/PolyFinger.cs(13,27): error CS0246: The type or namespace name `FingerModel' could not be found. Are you missing a using directive or an assembly reference?

Assets/LeapMotion/Scripts/Hands/PolyHand.cs(17,25): error CS0246: The type or namespace name `HandModel' could not be found. Are you missing a using directive or an assembly reference?

Assets/LeapMotion/Scripts/Hands/RiggedFinger.cs(17,29): error CS0246: The type or namespace name `FingerModel' could not be found. Are you missing a using directive or an assembly reference?

Assets/LeapMotion/Scripts/Hands/RiggedHand.cs(12,27): error CS0246: The type or namespace name `HandModel' could not be found. Are you missing a using directive or an assembly reference?

The error messages pretty much sum it up: these classes are not present in your project. It seems unlikely that the project on the Win 7 computer is exactly the same as the project on the Win 10 computer -- these are compile errors after all. My guess is that you are using an earlier version of the Leap Motion assets on the computer that works and the Orion version on the other computer. None of the classes shown in the error messages are included in the newer, Orion assets. (Even if you upgraded the assets on the Win 7 computer, it may still contain the older files, and classes that depend on them.)

The problem is that Leap Motion company made a mistake releasing the Unity SDK. They build it in the wrong framework. You may be able to run the project in unity but not to debug it with Visual Studio.

The company said that they will release an update of the SDK without any problems, we'll have to wait. Until that moment you can keep coding and use the Debug.Log function to debug at real time.

You can find more info in here:

https://community.leapmotion.com/t/cannot-compile-unity-c-script-if-i-use-leap-motion-orion-4-1-3/5514

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM