a space between each line of dialogue?
a space between each line of dialogue?
Hi Pixel Crushers!
I'm new to the asset and I'm trying to figure out something seemingly simple!
Right now, my dialogue looks like this:
-----
ACTOR1: hello something something something
ACTOR2: hello to you too
ACTOR1: nice
-----
How can I make it look like this?
-----
ACTOR1: hello something something something
ACTOR2: hello to you too
ACTOR1: nice
-----
So that there is a break between each character's line of dialogue. I've tried to change line spacing, but it changes all text. Is this is something in the Dialogue panel (modifying the database?) Is there something I can do to format what is being sent to the text component and being shown?
Thanks!
I'm new to the asset and I'm trying to figure out something seemingly simple!
Right now, my dialogue looks like this:
-----
ACTOR1: hello something something something
ACTOR2: hello to you too
ACTOR1: nice
-----
How can I make it look like this?
-----
ACTOR1: hello something something something
ACTOR2: hello to you too
ACTOR1: nice
-----
So that there is a break between each character's line of dialogue. I've tried to change line spacing, but it changes all text. Is this is something in the Dialogue panel (modifying the database?) Is there something I can do to format what is being sent to the text component and being shown?
Thanks!
Re: a space between each line of dialogue?
Hi,
Thanks for using the Dialogue System!
You can give the Dialogue Manager a small script with an OnConversationLine method, such as:
DoubleSpaceSubtitles.cs
This script adds a blank line at the end of every subtitle before it's send to the dialogue UI for display.
Thanks for using the Dialogue System!
You can give the Dialogue Manager a small script with an OnConversationLine method, such as:
DoubleSpaceSubtitles.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class DoubleSpaceSubtitles : MonoBehaviour
{
void OnConversationLine(Subtitle subtitle)
{
subtitle.formattedText.text += "\n";
}
}
Re: a space between each line of dialogue?
Thank you! Works great!
Re: a space between each line of dialogue?
Glad to help!
Re: a space between each line of dialogue?
Resurrecting this not-so-old-actually thread.
I understand, that "/n" adds an extra line. But how to modify spacing between the lines more precisely. I would need just a tad, so larger blocks of text are better readable.
- Olafs
I understand, that "/n" adds an extra line. But how to modify spacing between the lines more precisely. I would need just a tad, so larger blocks of text are better readable.
- Olafs
Re: a space between each line of dialogue?
Try "<br>" instead of "\n". I think that does a paragraph break in TextMesh Pro (although it's a line break in standard HTML). Then you should be able to set the paragraph spacing amount in your TextMeshProUGUI.
If that doesn't work, then instead of "\n" you could try a line break with a smaller font size: "<size=50%><br><size=100%>"
If that doesn't work, then instead of "\n" you could try a line break with a smaller font size: "<size=50%><br><size=100%>"
Re: a space between each line of dialogue?
Heh. Upon running the thing, it writes Subtitle properly and then switches to this oddly looking stuff:
[img] - ds01.jpg
Just "<br>" goes like this..
[img] - Screenshot_20.jpg
The winner is "\n", but, yep, it's too much...
[img] - Screenshot_21.jpg
[img] - ds01.jpg
Just "<br>" goes like this..
[img] - Screenshot_20.jpg
The winner is "\n", but, yep, it's too much...
[img] - Screenshot_21.jpg
- Attachments
-
- Screenshot_21.jpg (15.22 KiB) Viewed 1173 times
-
- Screenshot_20.jpg (8.33 KiB) Viewed 1173 times
-
- ds01.jpg (24.71 KiB) Viewed 1173 times
Re: a space between each line of dialogue?
Are you using TextMesh Pro? Make sure your TextMeshProUGUI allows rich text tags.
Re: a space between each line of dialogue?
Maybe, instead of the extra rich text tags, it would be sufficient to use only "\n" as before but increase the TextMeshProUGUI's Spacing Options > Line value.