Page 1 of 1

Instantiating DialougeManager into a scene that already has Dialogue Actors

Posted: Wed Sep 15, 2021 7:46 pm
by fkkcloud
Hello,

I am instantiating a DialogueManager prefab into a scene where it already instanced Dialogue Actor components.
It seems like the Dialogue Actor components that were already instanced before the DialogueManager prefab exists does not get registered.

What would be the best solution for this kinda situation?

Re: Instantiating DialougeManager into a scene that already has Dialogue Actors

Posted: Wed Sep 15, 2021 8:09 pm
by Tony Li
Hi,

The Dialogue Actor components register with the CharacterInfo script. It shouldn't matter that you're instantiating the Dialogue Manager prefab afterward.

What is not working properly?

Have you tried setting the Dialogue Manager's Other Settings > Debug Level to Info to get more information?

Re: Instantiating DialougeManager into a scene that already has Dialogue Actors

Posted: Wed Sep 15, 2021 8:33 pm
by fkkcloud
Hi,

With Dialogue Manager's Other Settings > Debug Level to Info, I don't see the characters with the Dialogue Actor component calling "Register" log.

If I manually deactivate and activate the game object that has the Dialogue Actor component, it does Register or Unregister it.

As it's not getting registered, it seems like it tries to register/look for the dialogue actor while the conversation is progressing (When the specific Dialogue Actor speaks), it does a hiccup since it goes through all gameObject to find it seems.

Re: Instantiating DialougeManager into a scene that already has Dialogue Actors

Posted: Wed Sep 15, 2021 8:54 pm
by Tony Li
It should still be registered, even if the Dialogue Manager isn't present to tell it to log the information to the Console window.

Is it possible that something else is causing the hiccup, such as the Dialogue Manager starting its database and initializing the dialogue UI?

Re: Instantiating DialougeManager into a scene that already has Dialogue Actors

Posted: Wed Sep 15, 2021 9:16 pm
by fkkcloud
It seems so.

I have below sequence command on startup node.

Code: Select all

SetPanel(Sia, 6);
SetPanel(Min, 6);
SetPanel(Inah, 6);
SetPanel(JungIn, 6);
SetPanel(Suji, 6);
I have other c# code that is called OnConversationStart so I will look into more on the initialization side of it.