Unity3D v5.0和Kinect插件名称冲突 [英] Unity3D v5.0 and Kinect plugin name collision

查看:186
本文介绍了Unity3D v5.0和Kinect插件名称冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我有一个Unity 5个人版,我已成功将Unity软件包(Kinect.2.0.1410.19000.unitypackage)导入到项目中,但我确实得到了导入后出现以下警告:

I have a Unity 5 Personal edition and I have successfully imported Unity package (Kinect.2.0.1410.19000.unitypackage) into the project, but I did get the following warnings after import:

脚本'Joint'与内置Unity组件同名。

AddComponent和GetComponent不适用于此脚本。

Script 'Joint' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.

脚本'AudioSource'与内置Unity组件同名。

AddComponent和GetComponent不适用于此脚本。

Script 'AudioSource' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.

这听起来不太好,因为它表明存在名称冲突。你能为此提供一个解决方案吗?

That does not sound good as it indicates that there is a name collision. Can you please provide a fix for this?

推荐答案

警告不是错误。您只需要小心使用正确的"联合"部分即可。你的代码中的类。你必须明确使用它。例如,如果您使用的是Kinect而不是使用Windows.Kinect名称空间,请使用Kinect
= Windows.Kinect;

warnings are not errors. You will just need to be careful to use the correct "Joint" class in your code. You will have to be explicit in your use. For example, if you are using Kinect instead of the using Windows.Kinect namepace, use using Kinect = Windows.Kinect;

然后当你想使用Kinects Joint对象时,使用全名Kinect.Joint来引用该对象。

Then when you want to use Kinects Joint object use the full name Kinect.Joint to reference that object.


这篇关于Unity3D v5.0和Kinect插件名称冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆