手机端如何制作虚拟按键

我试了试area2d和TouchScreenButton节点加上了脚本也不能对游戏内部输入对应指令
有没有什么好的方法呢?
///
JP:
スマホ向けに仮想ボタンを作りたいのですが、Area2DTouchScreenButtonノードにスクリプトを追加しても、ゲーム内に対応する入力指令が送信されません。これを実現する良い方法はありますでしょうか?
///
EN:

I’m trying to make virtual buttons for mobile, but even after adding scripts to Area2D or TouchScreenButton nodes, the corresponding input commands aren’t being sent to the game.Are there any effective methods to get this working?

你已经尝试过这篇文章中的方法了吗?

我试过了——用鼠标模拟触摸输入——但它没有触发动作。

我还没有尝试过这个链接中帖子提到的方法,但我现在打算试一试。

不客气!我使用了这个示例中的节点成功设置了按钮,喵。

1 个赞