Continue button highlight

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Oskar
Posts: 15
Joined: Wed May 17, 2023 6:18 am

Continue button highlight

Post by Oskar »

In my dialogue I have a custom continue button that is highlighted on hover; however, when there's a line from NPC with the continue button shown after it, then after that, a dialogue entry from other NPC and another continue button placed after that, the continue button doesn't highlight, even if it does so the first time. I have custom sprite images for the normal and highlighted continue button.

This is the sequence I use to activate the button:

SetActive(ExternalContinueButton)@Message(Typed);
required @Message (Continued);
required SetActive(ExternalContinueButton, false)@Message(Continued);

Below is a screen crab from the game. Where the red line is drawn, the first working continue button was shown and currently visible is the second one, meaning the one that doesn't get highlighted when hovered over. Any idea on how to fix this?
Attachments
screencrab.PNG
screencrab.PNG (572.62 KiB) Viewed 251 times
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue button highlight

Post by Tony Li »

Hi,

Is the continue button still selected even if Unity UI isn't drawing it in the highlighted visual state? To check this, keep an inspector view on the EventSystem GameObject while you're playing. The bottom of the inspector will show which button Unity UI has currently selected.

If it's not selected, inspect your Standard UI Subtitle Panel component. Assign the continue button to the First Selected field, and set Refresh Selectables Frequency to 0.5. This assumes your continue button is in the subtitle panel's hierarchy.
Post Reply