简体   繁体   English

Unity + Leap Motion:错误CS0246(命名空间)问题

[英]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. 我们在Windows 7计算机上运行的Unity 5程序与Oculus Rift + Leap Motion运行良好。 We tried to have the same program running on another computer with Windows 10, but these following errors showed up. 我们尝试在另一台装有Windows 10的计算机上运行相同的程序,但出现了以下错误。

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.) (ps.Oculus Rift和Leap Motion在Win10计算机上运行良好,具有单独的Unity项目:来自Leap Motion的名为“Core Assets”的软件包,显示Oculus和Leap Motion连接。)

Thanks! 谢谢!

The error messages in Unity are: Unity中的错误消息是:

Assets/LeapMotion/Scripts/Hands/DebugFinger.cs(14,28): error CS0246: The type or namespace name `FingerModel' could not be found. Assets / LeapMotion / Scripts / Hands / DebugFinger.cs(14,28):错误CS0246:找不到类型或命名空间名称“FingerModel”。 Are you missing a using directive or an assembly reference? 您是否缺少using指令或程序集引用?

Assets/LeapMotion/Scripts/Hands/PolyFinger.cs(13,27): error CS0246: The type or namespace name `FingerModel' could not be found. Assets / LeapMotion / Scripts / Hands / PolyFinger.cs(13,27):错误CS0246:找不到类型或命名空间名称“FingerModel”。 Are you missing a using directive or an assembly reference? 您是否缺少using指令或程序集引用?

Assets/LeapMotion/Scripts/Hands/PolyHand.cs(17,25): error CS0246: The type or namespace name `HandModel' could not be found. Assets / LeapMotion / Scripts / Hands / PolyHand.cs(17,25):错误CS0246:找不到类型或命名空间名称“HandModel”。 Are you missing a using directive or an assembly reference? 您是否缺少using指令或程序集引用?

Assets/LeapMotion/Scripts/Hands/RiggedFinger.cs(17,29): error CS0246: The type or namespace name `FingerModel' could not be found. Assets / LeapMotion / Scripts / Hands / RiggedFinger.cs(17,29):错误CS0246:找不到类型或命名空间名称“FingerModel”。 Are you missing a using directive or an assembly reference? 您是否缺少using指令或程序集引用?

Assets/LeapMotion/Scripts/Hands/RiggedHand.cs(12,27): error CS0246: The type or namespace name `HandModel' could not be found. Assets / LeapMotion / Scripts / Hands / RiggedHand.cs(12,27):错误CS0246:找不到类型或命名空间名称“HandModel”。 Are you missing a using directive or an assembly reference? 您是否缺少using指令或程序集引用?

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. Win 7计算机上的项目似乎不太可能与Win 10计算机上的项目完全相同 - 毕竟这些都是编译错误。 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. 我的猜测是你在运行的计算机上使用了早期版本的Leap Motion资产,而在另一台计算机上使用的是Orion版本。 None of the classes shown in the error messages are included in the newer, Orion assets. 错误消息中显示的所有类都不包含在较新的Orion资产中。 (Even if you upgraded the assets on the Win 7 computer, it may still contain the older files, and classes that depend on them.) (即使您升级了Win 7计算机上的资产,它仍可能包含旧文件和依赖它们的类。)

The problem is that Leap Motion company made a mistake releasing the Unity SDK. 问题是Leap Motion公司在发布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. 您可以以统一的方式运行项目,但不能使用Visual Studio进行调试。

The company said that they will release an update of the SDK without any problems, we'll have to wait. 该公司表示他们将毫无问题地发布SDK的更新,我们将不得不等待。 Until that moment you can keep coding and use the Debug.Log function to debug at real time. 在那之前,您可以继续编码并使用Debug.Log函数进行实时调试。

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 https://community.leapmotion.com/t/cannot-compile-unity-c-script-if-i-use-leap-motion-orion-4-1-3/5514

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误 CS0246,unity 找不到命名空间 - error CS0246, unity cannot find a namespace Unity引发错误“ CS0246:找不到类型或名称空间名称'SharpKml' - Unity throws an error “CS0246: The type or namespace name ‘SharpKml’ could not be found Unity 3d 错误 CS0246:找不到类型或命名空间名称“ParticleEmitter” - Unity 3d error CS0246: The type or namespace name 'ParticleEmitter' could not be found 导入 UnityEngine.InputSystem 的问题。 找不到错误 CS0246 类型或命名空间 - issue importing UnityEngine.InputSystem. Error CS0246 type or namespace not found 错误 CS0246:找不到类型或命名空间名称“IApplicationBuilderExtensions” - error CS0246: The type or namespace name 'IApplicationBuilderExtensions' could not be found 错误 CS0246:找不到类型或命名空间名称“PlayerMotor” - error CS0246: The type or namespace name 'PlayerMotor' could not be found 错误CS0246:找不到类型或名称空间名称“ HtmlAgilityPack” - Error CS0246: The type or namespace name `HtmlAgilityPack' could not be found 错误 CS0246:找不到类型或命名空间名称“UnityEngine” - error CS0246: The type or namespace name 'UnityEngine' could not be found 如何解决 CS0246 错误:(类型或命名空间名称错误)? - How to resolve CS0246 ERROR: (The type or namespace name Error)? 错误 CS0246:找不到类型或命名空间名称“KustoConnectionStringBuilder” - error CS0246: The type or namespace name 'KustoConnectionStringBuilder' could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM