【问题标题】:The type or namespace name `Kinect' does not exist in the namespace `Microsoft'命名空间“Microsoft”中不存在类型或命名空间名称“Kinect”
【发布时间】:2014-04-12 14:19:45
【问题描述】:

我正在使用 Unity 开发游戏,我想使用 Kinect,所以我添加了对 Microsoft.Kinect.ddl 的引用,并且我有以下代码(没什么印象):

using UnityEngine;
using System.Collections;
using Microsoft.Kinect;

public class Main : MonoBehaviour {

    // Use this for initialization
    void Start () {
        print(KinectSensor.KinectSensors.Count);
    }

    // Update is called once per frame
    void Update () {

    }
}

Visual Studio 没有标记任何错误,但是当我尝试使用 Unity 运行它时,我收到编译错误 The type or namespace name Kinect does not exist in the namespace Microsoft 。知道如何解决这个问题吗?

【问题讨论】:

标签: c# namespaces unity3d kinect


【解决方案1】:

我正在使用资产商店中的 k2examples 资产,我遇到了同样的问题...由于您没有使用相同的资产,这可能无法解决问题,但您可以尝试一下:

导入标准资产。

【讨论】:

    【解决方案2】:

    请参阅 this page 以了解统一使用 SDK。虽然它确实有一些明显的错误(如文档中所指出的那样。)

    【讨论】:

      猜你喜欢
      • 2018-05-09
      • 2018-06-14
      • 2021-07-28
      • 2013-05-04
      • 2015-01-05
      • 1970-01-01
      • 2017-12-29
      • 1970-01-01
      相关资源
      最近更新 更多