Hello,
I'm running into an issue that when text wraps in a bark the dialogue background does not resize to the actual text width and consequently an unpleasant visual.
In the attached image, which is a screenshot taking from the scene editor while the game was paused, one can see that there is some extra spacing (which I figure has something to do with the way wrapping works). I'd like to know how to get the dialogue background to match the actual text width. Is there a "quick fix" or does one need to take another approach to how the bark component is setup all together?
For reference what you see in the attached image is a very lightly modified version of the "Bubble Template Standard Bark UI" prefab - all I've done is change the font and the the image on the UI component.
Thanks,
Have bark dialogue resize to actual text width when text wraps
Have bark dialogue resize to actual text width when text wraps
- Attachments
-
- Screenshot 2021-01-08 154024.png (14.09 KiB) Viewed 238 times
Re: Have bark dialogue resize to actual text width when text wraps
Hi,
That's the way Unity UI works, unfortunately. It's not specific to the Dialogue System. When Text or TextMeshProUGUI reaches a point where it needs to wrap, it wraps but doesn't readjust the rect transform size. Can you center your text? This way an equal amount will be on either side, although the lines won't be left-justified.
That's the way Unity UI works, unfortunately. It's not specific to the Dialogue System. When Text or TextMeshProUGUI reaches a point where it needs to wrap, it wraps but doesn't readjust the rect transform size. Can you center your text? This way an equal amount will be on either side, although the lines won't be left-justified.
Re: Have bark dialogue resize to actual text width when text wraps
I noticed that centering can make the effect less-pronounced, but I'd really like to have the text left-justified. Surely someone else has run into this problem and come up with a solution?