Using the Switch Dialogue Panel script with new version

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
allisonrose
Posts: 32
Joined: Wed Nov 14, 2018 8:27 pm

Using the Switch Dialogue Panel script with new version

Post by allisonrose »

Hi!

I want to switch npc subtitle panels during conversations and found the "Switch Dialogue UI Panels" package on the extras page, but unfortunately it doesn't seem to work anymore, even after running the update.


I got the error "Dialogue System: SwitchPanels can't find its UnityUIDialogueUI!" so i thought I could just change that to StandardDialogueUI but then a whole slew more errors popped up.

Is there a simple way to update this script to be used with 2.0?

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

Re: Using the Switch Dialogue Panel script with new version

Post by Tony Li »

Hi,

That package is no longer needed.

One of the main reasons behind the Standard Dialogue UI is to make it easier to work with panels. To tell an NPC to use a specific subtitle panel, add a Dialogue Actor component to the NPC's GameObject and set Dialogue UI Settings > Subtitle Panel Number. To override this in a conversation, use the SetPanel() sequencer command.

If you want a conversation to use an entirely different dialogue UI, use an Override Dialogue UI or Override Display Settings component.
allisonrose
Posts: 32
Joined: Wed Nov 14, 2018 8:27 pm

Re: Using the Switch Dialogue Panel script with new version

Post by allisonrose »

Hey Tony,

I must be doing something wrong, because when I try to use the SetPanel sequencer command, the panel stays as whatever panel is set in the dialogue actor component no matter which panel number I try or which node I try the sequencer command on. If I remove the dialogue actor component, it just uses the default panel.

Here's some screenshots - maybe I have just missed something

Image
Image
Image
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using the Switch Dialogue Panel script with new version

Post by Tony Li »

Are there any warnings in the Console window?

What Dialogue System version are you using? (It's in Plugins/Pixel Crushers/Dialogue System/_README.txt)

SetPanel() was added in version 2.0.4.

Here's an example scene that uses SetPanel(): SetPanelExample_2019-02-07.unitypackage
allisonrose
Posts: 32
Joined: Wed Nov 14, 2018 8:27 pm

Re: Using the Switch Dialogue Panel script with new version

Post by allisonrose »

Doh. It looks like I was on an older version, so that's the cause. I've updated it now and it works!

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

Re: Using the Switch Dialogue Panel script with new version

Post by Tony Li »

Awesome, I'm glad it was an easy fix. :-)
Post Reply