Page 1 of 1

Bark system UI

Posted: Tue Sep 13, 2022 6:19 am
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?

Re: Bark system UI

Posted: Tue Sep 13, 2022 8:14 am
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.

Re: Bark system UI

Posted: Fri Sep 16, 2022 9:26 am
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?

Re: Bark system UI

Posted: Fri Sep 16, 2022 9:31 am
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.

Re: Bark system UI

Posted: Fri Sep 16, 2022 9:50 am
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.

Re: Bark system UI

Posted: Fri Sep 16, 2022 10:44 am
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 373 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.

Re: Bark system UI

Posted: Mon Sep 19, 2022 5:25 am
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.

Re: Bark system UI

Posted: Mon Sep 19, 2022 8:28 am
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.

Re: Bark system UI

Posted: Mon Sep 19, 2022 8:33 am
by Ekta Bhutwala
Ohh ok Tony.

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

Thanks for your support sir.

Re: Bark system UI

Posted: Mon Sep 19, 2022 8:42 am
by Tony Li
Glad to help!