SetPanel(ActorName, PanelID) when DialogueManager is a singleton.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

SetPanel(ActorName, PanelID) when DialogueManager is a singleton.

Post by fkkcloud »

Hello,

I am setting an actor's panel to be something specific in a dialogue like below.

Code: Select all

SetPanel(Minji, 11);
My DialogueManager prefab is a singleton. Let's say the default panel ID of Minji was NPC (say, ID is 2), would it reset to panel ID 2 when the prior conversion which set Minji's panel ID to be 11 is done?
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetPanel(ActorName, PanelID) when DialogueManager is a singleton.

Post by Tony Li »

Hi,

If there is a GameObject with a Dialogue Actor component set to Minji, SetPanel(Minji, 11) will also set the Dialogue Actor's Subtitle Panel Number, in addition to using panel ID 11 during the conversation. When you start the next conversation, since the Dialogue Actor is set to panel ID 11, it will use panel ID 11.

If there is no GameObject with a Dialogue Actor component set to Minji, SetPanel(Minji, 11) will only use panel ID 11 during the conversation. When the conversation ends, the Dialogue System will forget the SetPanel() and reset the panel ID to 2.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: SetPanel(ActorName, PanelID) when DialogueManager is a singleton.

Post by fkkcloud »

Thank you for the explanation.

If the game object with a DialogueActor that got set to panel 11 gets destroyed, a new conversation would set the actor to default panel 2, right?
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetPanel(ActorName, PanelID) when DialogueManager is a singleton.

Post by Tony Li »

Yes, that's correct.
Post Reply