Persistent custom panels

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Lyl
Posts: 9
Joined: Tue Mar 10, 2020 5:34 am

Persistent custom panels

Post by Lyl »

Hello Tony (and whoever is reading this post),

First of all, thank you and congratulation for this amazing tool, which is really handy for us little people :)

I'm currently trying to make a comic-like cutscene, where a new custom panel appears on each "continue" action, without erasing the previous ones (and the dialogs within). I do realize that I might not be really clear, so here is a visual example:

Image

So far I managed to keep the panels logged on screen by disabling the animator component; but not the text. The only theoretical solution I have in mind is to create a NPC for each panel but... Maybe there is a simpler way?

Thanks for your attention.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Persistent custom panels

Post by Tony Li »

Hi,

I think you may be able to define additional subtitle panels, and use the [panel=#] markup tag to direct dialogue entries to each one. Set their Visibility to Always Once Shown to keep them onscreen.

I'll put together a little example later today.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Persistent custom panels

Post by Tony Li »

Yes, you're correct that you will need to define additional actors. This is because actors clean up after themselves. If they start talking through one panel, they make sure to close any previous panel that contained their previous text.

Here's a quick example:

DS_PersistentCustomPanelsExample_2020-03-10.unitypackage

It looks like this:

Image

Alternatively, you could make a subclass of StandardUISubtitlePanel that doesn't allow itself to be hidden. That requires writing some code, though, versus having to create different actors for different lines.
Lyl
Posts: 9
Joined: Tue Mar 10, 2020 5:34 am

Re: Persistent custom panels

Post by Lyl »

Thanks for your answer and the example, I think I'll stick with the whole "one panel per npc" method for now ^^
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Persistent custom panels

Post by Tony Li »

Sounds good. Glad to help.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Persistent custom panels

Post by Tony Li »

I just had a thought: One way to do this is to create an actor for each custom bubble panel. Name the actors Panel2, Panel3, Panel4, etc.

Then create an empty GameObject for each of these actors. Add a Dialogue Actor component, select the actor, and set the Dialogue UI Settings > Subtitle Panel Number (2, 3, 4, etc.).

Now you can specify the actor for each dialogue entry node, and you don't have to use [panel=#] tags inside the dialogue text. If you select Menu > Show > Show Actor IDs in the editor, it will be very clear which panel each node's text will use.
Lyl
Posts: 9
Joined: Tue Mar 10, 2020 5:34 am

Re: Persistent custom panels

Post by Lyl »

It worked flawlessly!
Thanks for the idea, it optimizes a bit the whole shebang. I still need to test it when it comes to switch to another dialogue UI, but I'm not worried.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Persistent custom panels

Post by Tony Li »

I'm glad to hear that worked well for you!
Post Reply