unity5自带的UI Button的Inspector面板中只有On Click事件,如果我们想让一个按钮响应On Button Down事件该怎么办呢?方法是:

点Add Component->Event->Event Trigger添加一个Event Trigger组件。然后再点Add New Event Type->PointerDown。就得到"On Button Down"事件了。

参考:http://stackoverflow.com/questions/26661212/gui-of-unity-4-6-detecting-on-click-down

相关文章:

  • 2021-12-03
  • 2022-01-10
  • 2021-12-13
  • 2021-06-20
  • 2021-12-03
  • 2021-06-01
  • 2021-12-01
猜你喜欢
  • 2021-12-13
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2022-02-03
相关资源
相似解决方案