GestureRecognizer类 [英] GestureRecognizer class

查看:69
本文介绍了GestureRecognizer类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好:

我正在关注Lynda教程,学习如何为Microsoft HoloLens开发应用程序。不幸的是,Visual Studio无法识别类'GestureRecognizer',即它没有突出显示。

I am following a Lynda tutorial for learning how to develop apps for the Microsoft HoloLens. Unfortunately, Visual Studio does not recognize the class 'GestureRecognizer', i.e. it is not highlighted.

我安装的软件是:


  • Visual Studio 2017
  • .NET framework 4.7
  • Unity(最新版)

 void Start () {
        GestureRecognizer gestureRecognizer = new GestureRecognizer();
        gestureRecognizer.setRecognizableGestures(GestureSettings.Tap);

	}

我刚开始使用C#和Windows开发,希望有人能够提供帮助。

I am just starting with C# and Windows development and hope someone will be able to help.

谢谢!

推荐答案

我发现了这有效:

I found that this works:

    void Start () {
        UnityEngine.VR.WSA.Input.GestureRecognizer gestureRecognizer = new UnityEngine.VR.WSA.Input.GestureRecognizer();
        gestureRecognizer.SetRecognizableGestures(UnityEngine.VR.WSA.Input.GestureSettings.Tap);

    }

或者,在标题中添加名称空间:

Or, alternatively adding the namespace in the header:

using UnityEngine.VR.WSA.Input;





这篇关于GestureRecognizer类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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