Bark UI KeepInView

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bbjones
Posts: 21
Joined: Mon Aug 17, 2020 11:56 am

Bark UI KeepInView

Post by bbjones »

Hi,
I'm new to dialogue system and have gone through several tutorials and the manual and have a question about what to expect, or how to use bark UI with Keep In View checked.

When checked, I'm expecting the entire bark message to stay on screen on the edge closest to where the bark source is.

I am not seeing that behviour, issues include:
(linking images from my onedrive)

Message is cut in half on the edge
Normal when bark starts
https://1drv.ms/u/s!AjLMZMLArtRQ_CIGxHB ... -?e=47Fk0J
The move mouse left so bark source is no longer on screen, message is cut in half
https://1drv.ms/u/s!AjLMZMLArtRQ_CMTSHa ... j?e=eFn9Ii
Move mouse away to drag the message to the edge (cut in half), then back to the source the message remains pulled away from the source (ie. it doesn't snap back to the source). The cube is the source in this image:
https://1drv.ms/u/s!AjLMZMLArtRQ_CS8p74 ... e?e=NZye1n

Moving the mouse up/down results in the message moving entirely out of view. And same problem when moving mouse back to bark target the message says pulled off the source.

Is there more documentation on how to set this up correctly or is it working as designed?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark UI KeepInView

Post by Tony Li »

That is how Keep In View is currently designed. It keeps the origin point in view. In the next version, I'll change it so it keeps the entire Rect Transform in view, and I'll make a patch available here when the addition is ready.
bbjones
Posts: 21
Joined: Mon Aug 17, 2020 11:56 am

Re: Bark UI KeepInView

Post by bbjones »

Great.

Related to that I was wondering if there is a feature to change what the bark UI shows based on distance, or the bark source being out of view? This would apply to bubble UI for conversations as well.

Something like maybe just showing an icon when out of range or out of view so the player knows someone is talking off screen (maybe even showing the portrait if they recognize the voice), but they are too far away to hear clearly enough.
Maybe the text changes to garbled nonsense or something you might see in movie subtitles like "voices heard far away".

Another example is an NPC calling out to the player from far away to come see them. Something to just get the player's attention and let them know someone is trying to talk to them from that direction.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark UI KeepInView

Post by Tony Li »

The Dialogue System is designed to be modular so you can swap in your own implementations for bark UIs, dialogue UIs, etc. You can either make a subclass of StandardBarkUI or, if you prefer, provide your own UI implementation entirely from scratch by implementing the short C# interfaces IBarkUI and IDialogueUI.

For the features you're suggesting:

1. I might steal them if you don't mind. Those are some good ideas. They wouldn't make it into the next update, which is planned to be a minor patch update, but hopefully in the one after that.

2. You can make a subclass of StandardBarkUI or your own IBarkUI implementation. If you want to implement IBarkUI, the Templates/Scripts folder contains a commented starter template.

For the NPC call-out, you could add a Dialogue System Trigger or a script that listens for OnBarkStart. When the bark starts, the NPC can check if the player is far away. If so, play an animated gesture.
bbjones
Posts: 21
Joined: Mon Aug 17, 2020 11:56 am

Re: Bark UI KeepInView

Post by bbjones »

Tony Li wrote: Mon Aug 17, 2020 2:36 pm 1. I might steal them if you don't mind. Those are some good ideas. They wouldn't make it into the next update, which is planned to be a minor patch update, but hopefully in the one after that.
Please do.

Thanks for the details on the rest.
Post Reply