Not sure if this is specific to the ink integration, probably not, but probably yes because I'm using the Actor prefix option (instead of the #Actor= tags)
I'd like to have lines with a "(actor): blabla" prefix, for narration lines.
Note that I am using a shared UI with only one subtitle panel for all, and I want to turn off the actor prefix ONLY for one specific actor (which I have named "Narrator" for now, and if it's much work I'll go with that, but it would just be more beautiful if I could have those lines without any prefix:
I've tried with an empty DisplayName, but that doesn't work.
Lines without actor prefix (using ink integration)
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Lines without actor prefix (using ink integration)
Hi,
You can turn off other actor prefix features and add the prefix in a script that has an OnConversationLine method. For example, add a script with this method to the Dialogue Manager:
You can turn off other actor prefix features and add the prefix in a script that has an OnConversationLine method. For example, add a script with this method to the Dialogue Manager:
Code: Select all
using PixelCrushers.DialogueSystem;
...
void OnConversationLine(Subtitle subtitle)
{
if (subtitle.speakerInfo.nameInDatabase != "Narrator")
{
// If not the Narrator, prepend the actor's current display name:
subtitle.formattedText.text = $"{subtitle.speakerInfo.Name}: {subtitle.formattedText.text}";
}
}
-
- Posts: 150
- Joined: Mon Nov 23, 2020 6:35 am
Re: Lines without actor prefix (using ink integration)
Alright. I think I finally got it. Sorry for being such a bother, but I get that using OnConversationLine() you can essentially do whatever pre-processing you need. Incredibly powerful tool. I think the documentation doesn't do the sheer power of the Dialogue System justice. This is an utterly amazing package, one of the best I've ever bought.