Getting Lively Chat Bubbles Working

Announcements, support questions, and discussion for the Dialogue System.
Adam_LM
Posts: 11
Joined: Tue Dec 15, 2020 4:07 pm

Getting Lively Chat Bubbles Working

Post by Adam_LM »

Hello, I am working with:
Unity Version 2020.1.1f1 and
Adventure Creator Version 1.72.4.
Dialogue System for Unity Version 2.2.14
Lively Chat Bubbles 1.3.0

I have downloaded the Lively Chat Bubbles asset and am running into a few issues as I try to implement it. I have followed the guidance you provided here:
http://www.pixelcrushers.com/dialogue_s ... bbles.html

1. When following the Lively Chat Bubble Setup, I added a subtitle panel to my NPC and assigned an instance of ChatBubbleWhite as a child of the Dialogue Manager's Canvas. I resized the chat bubble and moved it to where I would want it to appear in the scene. I added a chat anchor around the place where my NPC's head is. I have created some dialogue for the NPC to say in the Conversations tab, and set up the hotspot to initiate the conversation. The issues I'm running into are that clicking the hotspot opens a blank speech bubble with no text and the speech bubble is off alignment from where it is in the scene view, and clicking does not continue or end the interaction.

2. I tried to follow the guidance you provided here: https://www.pixelcrushers.com/phpbb/vie ... php?t=3499
However, when I try to add a Continue Button to the Dialogue Panel of my Basic Standard Dialogue UI, the button is greyed out, and Unity will not allow me to add it as the Continue Button specified in the NPC's Subtitle Panel.

3. I am also wondering how I would set up my player character to use Lively Chat Bubbles - my player character is a prefab by necessity because I use character switching within Adventure Creator.

I took pictures of my various Inspectors in the hopes that it might provide further helpful context:


I know there's a lot of questions in there. Thanks so much for your help.

Best,
Adam
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting Lively Chat Bubbles Working

Post by Tony Li »

Hi Adam,

First, please check that the integration's example scene works in your project. Does the "LivelyChatBubbles Example" scene work?

Assuming it does, let's get the bubbles working without continue buttons first.

You can set up your AC player as a prefab. Add a Canvas as a child of the player (i.e., as a sibling of the LivelyChatBubbleSubtitlePanel GameObject), and assign it to the LivelyChatBubbleSubtitlePanel component. For example, your player prefab's hierarchy might look like:

Code: Select all

Player
    Canvas
    Subtitle Panel (LivelyChatBubbleSubtitlePanel component's Canvas field points to the player's Canvas)
If I were to use a similar setup in the example scene, the Yellow character's hierarchy might look like:

Code: Select all

Avatars
    Yellow
        Capsule
            Canvas
            Subtitle Panel (LivelyChatBubbleSubtitlePanel component's Canvas field points to the Yellow's Canvas)

For your NPC, first try doing the same. Lively Chat Bubbles places the bubble where it thinks it should go, so you don't need to move the bubble itself. Just set the Chat Anchor position.

Once you're happy with that, add a UI Button to the chat bubble (or chat bubble prefab). Assign it to the LivelyChatBubbleSubtitlePanel component's Continue Button field. You don't need to configure the OnClick() event. The component will take care of that at runtime.
Adam_LM
Posts: 11
Joined: Tue Dec 15, 2020 4:07 pm

Re: Getting Lively Chat Bubbles Working

Post by Adam_LM »

Hi Tony,
Thanks for your reply. I have run through the intergration's example scene and it does work! I tried following your suggestions here and made some forward progress, but am now getting stuck in a different spot. I have gotten my NPC character Marilyn to say her line of dialogue (and now the text appears, instead of just the bubble), after which my player character is supposed to say a response, but the interaction was ending once the NPC character said her line. I realized that my Player Character did not have a Dialogue Actor component attached. However, once I added one, and specifically once I set the character's Lively Chat Subtitle Panel in the Dialogue Actor component I get the following error message, and the NPC's dialogue will no longer play:

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.LivelyChatBubblesSupport.LivelyChatBubbleSubtitlePanel.HideImmediate () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/LivelyChatBubbles Support/Scripts/LivelyChatBubbleSubtitlePanel.cs:96)
PixelCrushers.DialogueSystem.LivelyChatBubblesSupport.LivelyChatBubbleSubtitlePanel.HideSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at Assets/Pixel Crushers/Dialogue System/Third Party Support/LivelyChatBubbles Support/Scripts/LivelyChatBubbleSubtitlePanel.cs:90)
PixelCrushers.DialogueSystem.StandardUISubtitleControls.HideSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Dialogue/StandardUISubtitleControls.cs:374)
PixelCrushers.DialogueSystem.StandardDialogueUI.HideSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Dialogue/StandardDialogueUI.cs:181)
PixelCrushers.DialogueSystem.ConversationView.FinishSubtitle () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:394)
PixelCrushers.DialogueSystem.ConversationView.OnFinishedSubtitle () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:406)
PixelCrushers.DialogueSystem.Sequencer.FinishSequence () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:508)
PixelCrushers.DialogueSystem.Sequencer.Update () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:500)
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting Lively Chat Bubbles Working

Post by Tony Li »

Hi,

Are there any errors or warnings prior to that one?

Have you assigned a chat bubble to the Lively Chat Bubble Subtitle Panel's Chat Bubble or Chat Bubble Prefab field?

That message is reporting on line 96. In the current version of the integration's LivelyChatBubbleSubtitlePanel.cs script, line 96 is:

Code: Select all

//base.HideImmediate();
Is the same true in your version of the script? If not, would you please import the the latest integration from version DS 2.2.14?

In fact, here's the very latest:

DS_LivelyChatBubblesSupport_2020-12-31.unitypackage

It's also on the Extras page and will be in version 2.2.15. It probably won't fix the issue on its own, but it will at least not show that error message.
Adam_LM
Posts: 11
Joined: Tue Dec 15, 2020 4:07 pm

Re: Getting Lively Chat Bubbles Working

Post by Adam_LM »

Hi Tony,
I had assigned the chat bubble to the Subtitle Panel's Chat Bubble field (not the prefab one). I just imported the support package you linked, and that definitely fixed the error! Now I'm just trying to figure out how to make my player character say their dialogue after the NPC, as it still ends the interaction after the NPC speaks. I have both characters listed as Actors of the Dialogue Database in their respective Dialogue Actor components, and the conversation lists both characters as having dialogue. No error messages display when running the interaction, so I figure it must be something I am not doing correctly.

Thanks again,
Adam
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting Lively Chat Bubbles Working

Post by Tony Li »

Hi Adam,

Does the NPC's node link to the player's node?

Also tick the Dialogue Manager's Subtitle Settings > Show PC Subtitle During Line. By default, the PC doesn't show subtitles because it shows the node's text in response menus. (To turn off response menus for single-item menus, untick Input Settings > Always Force Response Menu.)
Adam_LM
Posts: 11
Joined: Tue Dec 15, 2020 4:07 pm

Re: Getting Lively Chat Bubbles Working

Post by Adam_LM »

Hi Tony,
It was almost certainly that I hadn't checked the Show PC Subtitle During Line box on my Dialogue Manager. Thanks for helping me spot that. Unfortunately I couldn't test on the same version of the game, because I was getting Compile Errors for AC that prevented me from entering PlayMode. Based on feedback in their forum, I decided to start again from a version of my project before I had imported the Dialogue System and Lively Chat Bubbles. I updated in the following order: (1) Updated to latest version of Adventure Creator (done before Unity update as suggested in the AC manual), (2) Updated Unity to 2020.2.1f1, and was prompted to and updated my URP Materials, (3) redownloaded and imported the Dialogue System and Lively Chat Bubbles, including the support package you've linked in this thread.

I have retraced my steps for setting up AC Bridge, Dialogue System Saver, and Setting up the NPC and Player Dialogue Actor components, Dialogue Database, and example conversation. The current error I'm running into happens when I connect my Player Character (Prefab)'s Subtitle Panel to its relevant field in the Player's Dialogue Actor component. The error happens right after the NPC's dialogue line completes after clicking the hotspot, and reads:

: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.LivelyChatBubblesSupport.LivelyChatBubbleSubtitlePanel.ShowSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Pixel Crushers/Dialogue System/Third Party Support/LivelyChatBubbles Support/Scripts/LivelyChatBubbleSubtitlePanel.cs:83)

Additional lines of the script cited in the Error are: 353, 176, 141, 208, 272, 399, 406, 508, and 500.

Thanks so much for your help.

[EDIT] I'm adding a couple pictures of my Prefab Character's hierarchy and Subtitle Panel in case it's helpful:
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting Lively Chat Bubbles Working

Post by Tony Li »

Adam_LM wrote: Sun Jan 03, 2021 8:48 pmAdditional lines of the script cited in the Error are: 353, 176, 141, 208, 272, 399, 406, 508, and 500.
Hmm, the script is only 100 lines long.

Let's take a look at the Lively Chat Bubble Subtitle Panel in the inspector instead. Is ChatBubble Caitlin assigned to Chat Bubble field? (Not the Chat Bubble Prefab field.) Are the Canvas, Chat Anchor, Audio Source, and Chat Output Profile fields assigned?

Have you imported the updated Lively Chat Bubbles Support package from the Dialogue System Extras page?
Adam_LM
Posts: 11
Joined: Tue Dec 15, 2020 4:07 pm

Re: Getting Lively Chat Bubbles Working

Post by Adam_LM »

Sorry, I was mistaken, the errors were for different scripts. I'll post the whole error here:

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.LivelyChatBubblesSupport.LivelyChatBubbleSubtitlePanel.ShowSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Pixel Crushers/Dialogue System/Third Party Support/LivelyChatBubbles Support/Scripts/LivelyChatBubbleSubtitlePanel.cs:83)
PixelCrushers.DialogueSystem.StandardUISubtitleControls.ShowSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Dialogue/StandardUISubtitleControls.cs:353)
PixelCrushers.DialogueSystem.StandardDialogueUI.ShowSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Dialogue/StandardDialogueUI.cs:176)
PixelCrushers.DialogueSystem.ConversationView.StartSubtitle (PixelCrushers.DialogueSystem.Subtitle subtitle, System.Boolean isPCResponseMenuNext, System.Boolean isPCAutoResponseNext) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:141)
PixelCrushers.DialogueSystem.ConversationController.GotoState (PixelCrushers.DialogueSystem.ConversationState state) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:208)
PixelCrushers.DialogueSystem.ConversationController.OnFinishedSubtitle (System.Object sender, System.EventArgs e) (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:272)
PixelCrushers.DialogueSystem.ConversationView.FinishSubtitle () (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:399)
PixelCrushers.DialogueSystem.ConversationView.OnFinishedSubtitle () (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:406)
PixelCrushers.DialogueSystem.Sequencer.FinishSequence () (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:508)
PixelCrushers.DialogueSystem.Sequencer.Update () (at /Users/adamlamotte/Desktop/Caitlin Project Unity/Caitlin Project/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:500)

Here are pictures of my Prefab Character's hierarchy and Subtitle Panel:

I made sure the latest ChatBubbleSupport is up to date. The ChatBubble Caitlin is assigned to the ChatBubble field (Rather than the ChatBubble Prefab field). I have not yet assigned an audio source, but have the other fields assigned. I haven't yet set up a sound child for my character prefab, which I'm guessing would be the audio source?

Thanks,
Adam
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting Lively Chat Bubbles Working

Post by Tony Li »

Hi,

Can you try leaving the "ChatBubble Caitlin" GameObject active? The LivelyChatBubbleSubtitlePanel script will automatically deactivate it when it initializes, so there's no need to keep it inactive in the prefab.
Post Reply