- Home /
Question by
AlexanderAsmussen80 · Jan 08, 2016 at 05:13 PM ·
c#uiinputfield
Catching get focused for UI InputField
Hi,
this is my first questions, so please excuse some mistakes ;) I already tried to find a answer for my question, but without any success.
Now to the problem. In my game you can navigate with WASD. I created with the new UI system an InputField to chat and send "console commands".
In my Controller.cs I already have a bool for "isInChat", which I want to send when I click into the InputFiled, but I can't find a function like "OnFocus" or such stuff.
I tried:
void OnPointerClick(PointerEventData eventData)
void OnDeselect(BaseEventData eventData)
void OnPointerEnter(BaseEventData eventData)
void OnPointerEnter(PointerEventData eventData)
I added it to differend GameObjects (InputField itself, InputField->InputField Input Caret and InputField->Text) but none of them react in any way.
Has someone an idea?
Thanks alot and with best regards
Alex
P.S.: Unity 5.3.1
Comment