InputField losing focus during conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
cptscrimshaw
Posts: 113
Joined: Sun Sep 20, 2020 8:21 pm

InputField losing focus during conversation

Post by cptscrimshaw »

Hi Tony,

Kind of a strange problem I've run into. I have a custom TMP_Inputfield that I'm bringing up in the Sequence of a node in a conversation like so:

Code: Select all

SetActive(HUDTextInput, true)@{{end}};
WaitForMessage(InnNamed)
Then once the player hits the submit button, it continues the conversation utilizing the new variable value:

Code: Select all

string innName = inputField.text;
DialogueLua.SetVariable("InnName", innName);

//Tell DS to continue conversation
Sequencer.Message("InnNamed");
This all works great! My problem is that my inputfield seems to lose focus (on every frame from what I can tell), so if I click on it, it will highlight the text and then immediately lose focus. I can only type in one letter or so unless I spam.

If I bring up the inputfield outside of a conversation, it works just fine. Is DS constantly stealing my focus? Am I missing a setting somewhere?

Thanks for your help!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: InputField losing focus during conversation

Post by Tony Li »

Hi,

Inspect the subtitle panels and rseponse menu. Set Focus Check Frequency to zero.

If Focus Check Frequency is non-zero and the Dialogue System's Input Device Manager has detected that you're using a joystick or Always Auto Focus is ticked, then every frame it will set navigation focus back to the panel's selectables.
Post Reply