Selector UI becomes briefly visible when conversation ends

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Selector UI becomes briefly visible when conversation ends

Post by Tony Li »

If the selector is using Mouse Position and the selector UI becomes briefly visible, first check the setup steps of the Interaction Tutorial, particularly at 07:00. Make sure the player is being used as the Conversation Actor, and use a Dialogue System Events component to disable the Selector during conversations.
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Selector UI becomes briefly visible when conversation ends

Post by Shinos »

Hi Tony, i wanna begin this message saying that i am truly amazed by the amount of support you put in your work, i didn't thought you would answer me on an years old video or even post the question in the forum, i'am really grateful.
It seems that the issue derived from the absence of a Conversation Actor, if the variable is left blank this issue begin to appear where the Selector UI becomes briefly visible, when i put a conversation actor the bug didn't manifest itself anymore.

I would like to use this post to do another question, i am doing a 2d pixel art project and i am struggeling to get nice 2d fonts in Barks, they seems to be either "too blurry" or "too crisp" i tried to change the Bubble Template and increase the Pixels per Unit value but doing so in World Space render mode only made the UI to disappear or to become too small, instead changing the render to Scren Space and trying to increase the Pixels per Unit value got me to a nice visual in the fonts but the barks doing so don't appear on top of an NPC head but they obviously get rendered in the same spot over the camera, i tried to increase the Font size value but it didn't get me to have nice results, i am a little lost here ç_ç

here is an example https://ibb.co/KGnP3wm at first sight this may seem good but if you look closely you will notice that something is off in the font crispness, it is not smooth

I'm trying to get something this smooth https://ibb.co/xFPWSsz, i had this same issue also with the Bark Bubble Image where the "tail" was super blurried, so i just changed it this blue cube because it was driving me nuts :cry:
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selector UI becomes briefly visible when conversation ends

Post by Tony Li »

Hi,

If you're using Text components for your text, switch to TextMesh Pro. (See the Dialogue System's TextMesh Pro Support.)

TextMesh Pro uses its own font system. You can convert TTF and OTF fonts to TextMesh Pro fonts. Here's a tutorial by Dan Liberatore: Pixel Perfect Text and UI

In addition to crisper text, you can also use the excellent Text Animator asset (separate purchase) if you want to add neat text effects. (See Text Animator Integration.)

Another option is to use a screen space canvas. The Dialogue System Extras page has a "UI Smooth Follow" example scene that demonstrates how to use a screen space bubble subtitle UI. The process is the same for a bark UI.

Related: How To: Make World Space Canvas Appear On Top Of Everything Else
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Selector UI becomes briefly visible when conversation ends

Post by Shinos »

Thank you i'll read everything you sent me, the only problem i faced by using a Screen Space canvas for the bark as i said was that they didn't show up on top of the head of NPCs but instead they were related to a fixed position on bottom of the screen.
is the UI Smooth Follow example strictly made to solve this issue? i kinda need some context :?: because i have seen that the barks already follows the Npcs right now.
Do the example uses the Screen space canvas for the font issue or for another reason? i ask this because in the actual standard prefab it is in world space, so i'm quite confused :cry:
Last edited by Shinos on Tue Jan 17, 2023 12:28 pm, edited 3 times in total.
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Selector UI becomes briefly visible when conversation ends

Post by Shinos »

Even if i think that maybe the right approach would be in trying to adjust these issues by twitching the font size or by tinkering with TextMeshPro, because i kinda feel like using Screen Space render "hacks" to simulate what i would do in world space just for the font is a bit unnecessary. i always used world space to put UI elements which were related strictly to Game Objects position in the world, why does this font blur issue only happens in the world renderer?

PS: I implemented TMpro and it works flawlessly
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selector UI becomes briefly visible when conversation ends

Post by Tony Li »

Hi,

The "UI Smooth Follow" example has a script that makes a screen space UI follow the position of a GameObject (e.g., puts the UI over the NPC's head).

There are two reasons why you might want to use a screen space UI:

1. It's easier to get crisp text without the scaling issues that the Text component has. But using TextMesh Pro with a world space canvas is another good way to get crisp text.

2. The overhead bubble stays the same size regardless of how far away the NPC is. However, this may not be something you want. You may want farther NPCs' overhead bubbles to be smaller to help indicate their distance.
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Selector UI becomes briefly visible when conversation ends

Post by Shinos »

Thank you for the explanations Tony :D
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Selector UI becomes briefly visible when conversation ends

Post by Tony Li »

Glad to help!
Post Reply