Y
Y
YakutD2019-08-14 21:34:11
C++ / C#
YakutD, 2019-08-14 21:34:11

How to catch UI button click without using On Click?

Such a situation that it is necessary to do just that. In short - in fact, I need that pressing the UI button is equivalent to pressing a key on the keyboard.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2019-08-15
@YakutD

Answering the question in the title - throw a raycast from the click point and see where it hits.
But here I can’t understand at all what prevents using OnClick with a condition
You have handlers - keyboards, UI, and they pull the same function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question