Page 1 of 1
SetPanel(ActorName, PanelID) when DialogueManager is a singleton.
Posted: Mon Jul 18, 2022 2:59 am
by fkkcloud
Hello,
I am setting an actor's panel to be something specific in a dialogue like below.
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?
Re: SetPanel(ActorName, PanelID) when DialogueManager is a singleton.
Posted: Mon Jul 18, 2022 8:33 am
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.
Re: SetPanel(ActorName, PanelID) when DialogueManager is a singleton.
Posted: Mon Jul 18, 2022 8:42 am
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?
Re: SetPanel(ActorName, PanelID) when DialogueManager is a singleton.
Posted: Mon Jul 18, 2022 8:55 am
by Tony Li
Yes, that's correct.