Need help to show subtitle regardless if there is no text
Posted: Wed Aug 14, 2024 3:20 pm
Hi!
I'm using the asset and finding it very handy so far.
However, I'm facing a problem to customize it according to my project's requirements.
I needed to show only images in some speech bubles and this was solved easily by installing this package:
https://www.pixelcrushers.com/phpbb/vie ... php?t=7931
Now, I want to only show the images, but if I left the Dialogue Text Field empty in a given dialogue node, the subtitle doesn't show. I managed to discover that commenting the following lines from the StandardUISubtitleControls.ShowSubtitle(Subtitle subtitle) method the problem is solved.
With that, I thought of creating subclasses of the StandardUISubtitleControls, StandardUIDialogueControls and StandardDialogueUI classes. However when creating a subclass of StandardUISubtitleControls and trying to override the ShowSubtitle(Subtitle subtitle method) I'm faced with errors of missing fields and methods because the superclass have them as private. What is the best approach to solve my original problem (show dialogue UIs regardless of having or not an empty dialogue text)?
I'm using the asset and finding it very handy so far.
However, I'm facing a problem to customize it according to my project's requirements.
I needed to show only images in some speech bubles and this was solved easily by installing this package:
https://www.pixelcrushers.com/phpbb/vie ... php?t=7931
Now, I want to only show the images, but if I left the Dialogue Text Field empty in a given dialogue node, the subtitle doesn't show. I managed to discover that commenting the following lines from the StandardUISubtitleControls.ShowSubtitle(Subtitle subtitle) method the problem is solved.
Code: Select all
else if (string.IsNullOrEmpty(subtitle.formattedText.text))
{
HideSubtitle(subtitle);
}