First response deselected on dialogue start
Posted: Tue Dec 10, 2024 11:58 am
I have just updated dialogue sys from 2.2.9 to 2.2.50 in my project. It went surprisingly smooth. But one minor problem is arised. If I start first conversation first response was always automatically selected in dialogue, what is pretty convinient. It is not the case anymore after update. As I remember this automatically selection of first response was not my custom code, but just ootb feature of Dialogue Sys. I have found several hints what is going on:
1) Technically first response will be selected for very short time, I can even see it is blinking shortly, but then instantly deselected back.
2) It only happens on first dialogue. Further dialogues have Response 1 correctly selected from start. ( I have tried pre-warm option in main setting, but it does not seems to help here)
3) I can still hear my custom Click sound by hitting enter without selection. I have debugged with EventSystem.current.currentSelectedGameObject to see what object has selection then instead. And result is a pretty big hint. It is Response Button Template, so the template button that will be used to produce all other reponses. (If this matters, I am using slighly adjusted version of Runic Standard Dialogue UI).
Any ideas or workarounds for that? Maybe this is some known bug, or my wrong configuration. I would say before update this was not the case. What class in Dialogue sys is responsible for first selection at all?
Of course I could try quick and dirty bugfix like:
But it is pretty messy bugfix try, so I have decided to ask first.
1) Technically first response will be selected for very short time, I can even see it is blinking shortly, but then instantly deselected back.
2) It only happens on first dialogue. Further dialogues have Response 1 correctly selected from start. ( I have tried pre-warm option in main setting, but it does not seems to help here)
3) I can still hear my custom Click sound by hitting enter without selection. I have debugged with EventSystem.current.currentSelectedGameObject to see what object has selection then instead. And result is a pretty big hint. It is Response Button Template, so the template button that will be used to produce all other reponses. (If this matters, I am using slighly adjusted version of Runic Standard Dialogue UI).
Any ideas or workarounds for that? Maybe this is some known bug, or my wrong configuration. I would say before update this was not the case. What class in Dialogue sys is responsible for first selection at all?
Of course I could try quick and dirty bugfix like:
Code: Select all
void Update() {
if (EventSystem.current.currentSelectedGameObject.name == "Response Button Template") {
somehow_select_response_1();
// I think just this will not work
// EventSystem.current.setCurrentSelectedGameObject(FindObjectByName("Response 1"));
}
}