Bark system UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Bark system UI

Post by Ekta Bhutwala »

Hii

i have attached images below:

as you can see when we hover mouse over different types of object we can see icon and name of the character with whom we can talk or do some action.

So it it possible with barks? or do i need to write my own unity code?
Attachments
Screenshot 2022-09-13 154626.png
Screenshot 2022-09-13 154626.png (64.79 KiB) Viewed 413 times
Screenshot 2022-09-13 154553.png
Screenshot 2022-09-13 154553.png (96.81 KiB) Viewed 413 times
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark system UI

Post by Tony Li »

Hi,

You can do the same with barks. Set it up just like a Dialogue System Trigger (OnUse) that starts a conversation, except instead of Add Action > Start Conversation, select Add Action > Bark.
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Bark system UI

Post by Ekta Bhutwala »

Hii

I am getting warning Like

Dialogue System: Bark (speaker=Circle (UnityEngine.Transform), listener=Selector (UnityEngine.Transform)): 'Mr. Smith' speaker has no bark UI

So UI is not coming

and how to get Bark UI when we hover mouse on object?
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark system UI

Post by Tony Li »

Thanks for posting the log info. In this line:

Dialogue System: Bark (speaker=Circle (UnityEngine.Transform), listener...

The Dialogue System is looking for a bark UI in the hierarchy of the Circle GameObject. Is that the correct GameObject? Does it have a bark UI in its hierarchy? It's also OK for it to have a Dialogue Actor component whose Bark UI field points to a bark UI prefab.

If Circle is not the correct GameObject, assign the correct GameObject (the one with the bark UI) to the Dialogue System Trigger's Barker field.
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Bark system UI

Post by Ekta Bhutwala »

Hii

Now bark UI is coming but it's coming when i click on object.

I want it to display when i hover on gameobject.
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark system UI

Post by Tony Li »

Hi,

I'll answer your first question first. Then I'll provide a better solution.

Dialogue System Triggers don't have an "OnHover" option. However, you can set the Usable component's OnSelect() UnityEvent to invoke DialogueSystemTrigger.OnUse:
triggerOnSelect.png
triggerOnSelect.png (55.08 KiB) Viewed 378 times

But this is not what you should do to show text when the player hovers the mouse on a GameObject. Instead, set the player's Selector component > Select At dropdown to Mouse Position, and set Max Selection Distance to 9999. When the mouse hovers over a Usable GameObject, the selector UI will show the Usable's name and the Selector's Use Message. On the Usable component, you can override the text that it shows.

If you want to see this in action, open DemoScene1. Inspect the Player. Set the Selector's Select At to Mouse Position and set Max Selection Distance to 9999. Then inspect Private Hart and set the Usable component's Max Use Distance to 9999. Play the scene. Mouse movement will still rotate the camera, but ignore that for now. When you mouse over Private Hart, it will show the use text.
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Bark system UI

Post by Ekta Bhutwala »

Ok i got it what you explained.

But how to change that UI? currently it is coming in very small font and i want UI to follow mouse when mouse is over object.

Is this possible?

Reference link : https://www.youtube.com/watch?v=sVMUNh3CtIU

Check on time 1:14 s in video.

Thanks tony.
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark system UI

Post by Tony Li »

Hi,

The Dialogue System doesn't have a feature to make the UI follow the mouse. I recommend using an interaction asset or a custom script to do that. Configure the interaction asset or custom script to call the Dialogue System Trigger's OnUse() method. Adventure Creator is a popular asset used to make games like that. The Dialogue System has Adventure Creator integration.
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Bark system UI

Post by Ekta Bhutwala »

Ohh ok Tony.

I will check that asset. Thanks for your help and quick response.

Thanks for your support sir.
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark system UI

Post by Tony Li »

Glad to help!
Post Reply