gpt4 book ai didi

How do I use Buttons when I'm using unity's Enhanced Touch for a player controller that covers the whole screen?(当我为覆盖整个屏幕的播放器控制器使用unity的增强触摸屏时,如何使用按钮?)

转载 作者:bug小助手 更新时间:2023-10-26 20:04:11 24 4
gpt4 key购买 nike



I want to create a pause button on my game, and I have an EnhancedTouch based Player controller where I spawn a Joystick wherever I touch, the thing is I want to check if I'm pressing an unity UI element like a button/slider/dropdown, etc so it doesn't take into account that input specially buttons.

我想在我的游戏上创建一个暂停按钮,我有一个基于EnhancedTouch的Player控制器,我在触摸的任何地方都会产生一个操纵杆,问题是我想检查我是否按下了一个统一的UI元素,如按钮/滑块/按钮等,所以它不会考虑输入特别按钮。


Is there a way of doing that or an alternative workaround? Thankyou.

有什么方法可以做到这一点,或者有替代的解决办法吗?谢谢。


更多回答
优秀答案推荐
更多回答

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com