团结 - 钢系列Nimbus输入 [英] Unity - Steel Series Nimbus Input

查看:212
本文介绍了团结 - 钢系列Nimbus输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我的钢铁系列Nimbus作为我的iOS游戏的无线遥控器,但我不能得到输入的工作。左右杆工作正常,但没有一个按钮,触发器或缓冲器工作。我认为这是我的输入管理器设置。

I am trying to use my Steel Series Nimbus as a wireless remote for my iOS game but I can't get the input to work. The left and right stick work just fine but none of the buttons, triggers or bumpers work at all. I think it is something to do with my Input Manager Settings. If anyone can help it would be much appreciated if you could give me an answer.

非常感谢,

Tommy:)

推荐答案


,但是按钮,触发器或缓冲器都没有工作。我认为
与我的输入管理器设置有关。

but none of the buttons, triggers or bumpers work at all. I think it is something to do with my Input Manager Settings.

也许你没有正确阅读它们?使用下面的代码找出所有的Steel系列Nimbus操纵杆按钮 KeyCodes ,然后使用 KeyCode 被按下。

Maybe you are not reading them correctly? Use the code below to find out all the Steel Series Nimbus Joystick button KeyCodes then use the KeyCode to detect when the Button is pressed.

只需连接Controller,在屏幕上创建简单 Text ,然后将其拖动到文本插槽。构建和运行。运行时,按下控制器上的按钮,记下 KeyCodes 。这些 KeyCodes 你应该使用正确检测后按下的按钮。您可以在此处详细了解iOS控制器支持

Simply connect the Controller, Create simple Text on the screen then drag it to the text slot. Build and Run. While running, press buttons on the controller and write down their KeyCodes. These KeyCodes you should then use to properly detect button that is pressed later on. You can learn more about iOS controller support here.

public class KeyCodeFinder : MonoBehaviour
{
    public Text text;

    Array allKeyCodes;

    void Start()
    {
        allKeyCodes = System.Enum.GetValues(typeof(KeyCode));
    }

    void Update()
    {
        foreach (KeyCode tempKey in allKeyCodes)
        {
            if (Input.GetKeyDown(tempKey))
            {
                text.text = "Pressed: KeyCode." + tempKey;
                Debug.Log("Pressed: KeyCode." + tempKey);
            }
        }
    }
}

这篇关于团结 - 钢系列Nimbus输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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