Setting up continue button for corgi engine

Announcements, support questions, and discussion for the Dialogue System.
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

Tony Li wrote: Sat Jun 02, 2018 10:45 am Hi,

Thanks for buying the Dialogue System!

Here's an example scene: DS_CorgiDialogueUIContinueButtonExample_2018-06-02.unitypackage

I only set up Dude1 and Dude2.

The Corgi integration works a little differently. Each NPC has its own DialogueUI child GameObject that has an Override Unity UI Dialogue Controls component. This component overrides the controls that are on the Dialogue Manager's regular dialogue UI (e.g., Generic Unity UI Dialogue UI in the example scene).

This means you need to add a continue button to the NPC's DialogueUI and assign it to the NPC's Override Unity UI Dialogue Controls component.

In the example scene, I set up Dude1 like this:

1. Expanded Dude-DS1 > ConversationZone > DialogueUI > Panel > TextPanel. Added an new UI button named "Continue Button".

2. Added a Unity UI Continue Button Fast Forward component to the button. Pointed the Dialogue UI field to the Dialogue Manager's Unity UI Generic Dialogue UI. Pointed the Typewriter Effect field to the Subtitle Line. Then I configured the button's OnClick() event to call UnityUIContinueButtonFastForward.OnFastForward. You only need to do these steps if you want to fast-forward the typewriter. If you instead want the continue button to immediately skip to the next line even if the typewriter is still typing, don't add this component. Point the OnClick() event directly to the Unity UI Generic Dialogue UI's OnContinue method.

3. Added a UI Button Key Trigger component to make the 'A' key a hotkey for the button. You can also assign an input button such as the joystick 'B' button if you want.

4. Assigned the continue button to the NPC's Overide Unity UI Dialogue Controls > Continue Button field.

5. Finally, just as you did, I set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
After successfully upgrading from 1.8.2 to 2.0.4 the overhead custom UI didn't work , instead I'm getting the default UI of DS.
is there any further setups I should do to make it work again?
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Hi,

Did you import version 2.0.4's updated Corgi Support package?

Does the example scene work?

In your scene, are there any errors or warnings?
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

yes, imported version 2.0.4's updated Corgi Support package, but just checked the example scene, there are radical changes that I didn't do, now the conversations appear above characters as before and I've managed to make the continue button work also , here is what I did to make the continue buttong work again so others may benefit:
1.open Corgi Example Scene

2.Expanded Dude-DS1 > ConversationZone > CorgiStandardDialogueControls> Panel > TextPanel. Added an new UI button named "Continue Button".

3.Added a Standed UI Continue Button Fast Forward component to the button. . Pointed the Typewriter Effect field to the Subtitle Line. Then I configured the button's OnClick() event to call StandardUIContinueButtonFastForward.OnFastForward.

4. Added a UI Button Key Trigger component to make the 'A' key a hotkey for the button or any other button.

5 .Assigned the continue button to the NPC's Standard UI Subtitle> Continue Button field.

6. I set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Thanks for posting that! I just added those steps to a new section in version 2.0.5's Corgi Support documentation.
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

Tony Li wrote: Sat Jun 02, 2018 2:03 pm You can do this with barks but, since it sounds like you want a back-and-forth conversation, a real conversation is probably better.

Here's an example scene: DS_CorgiDialogueUIBarks_2018-06-02.unitypackage

Here's how I set it up:

1. Made a copy of the player prefab, and copied Dude1's DialogueUI to it. Repositioned it slightly since the player is shorter.

2. Added an Override Actor Name to the player prefab, and set the name to "Player".

3. Created a new dialogue database with one conversation. Clicked on empty canvas space to edit the conversation's properties. Ticked:
  • Override Display Settings > Subtitle Settings > Show PC Subtitles During Line (so PC's lines will show above head)
  • Override Display Settings > Subtitle Settings > Continue Button mode to Never (optional)
  • Override Display Settings > Input Settings > UNticked Always Force Response Menu
I've tried to do the overhead back and forth conversation like the example you sent me before for 1.8.2 but unfortunatly I failed, here is what I did trying to accomplish that:
1. opened Corgi Example scene
2. made a copy of player prefab , copied Dude1's CorgiStandardDialogueControls to it, repositioned it slightly to fit player.

3. added Dialogue Actor and setted Subtitle Panel Number to custom then assigend the Standard UI Panel from CorgiStandardDialogueControls, also setted Custom Menu Panel field to cutsom and assigned Standard UI Menu Panel from Response Menu Panel which is inside CorgiStandardDialogueControls ,

now I'm getting the following error "Dialogue System: In ShowResponses(): Object reference not set to an instance of an object"
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Hi,

This package contains two example scenes: (Updated: CorgiBackAndForthExample_2018-10-01.unitypackage)

In the first scene, the subtitle panels stay visible. To set it up, I used these steps:

1. Copied the Dialogue System's Corgi Support example scene.

2. Temporarily added the player prefab to the scene.

3. Duplicated Dude-DS1's ConversationZone > CorgiStandardDialogueControls, and moved it to be a child of the player prefab.

4. Added a Dialogue Actor component to the player prefab. Set the Actor dropdown to Player. Set the dialogue UI subtitle and menu panels to Custom, and assigned the panels from inside the CorgiStandardDialogueControls.

5. Saved the player as a new prefab, deactivated the GameObject, and assigned the new prefab to Corgi's LevelManager in the scene.

I also wrote a test conversation and changed these settings on the Dialogue Manager:
  • Subtitle Settings > Show PC Subtitles During Line: ticked
  • Input Settings > Always Force Response Menu: unticked

In the second scene, only the current speaker's subtitle panel is visible. I set it up similarly, except I moved the player's Menu Panel to be separate from the Subtitle Panel.
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

Many thanks. everything working perfectly with those examples now :D
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Always glad to help!
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

Hi Tony,

thanks for your patience and continues help, I'm sorry to inform you that I found 2 bugs:
1. in the back and forth 2nd example scene , if the NPC started the chat ( I changed the conversation so NPC start saying Hi) the player keeps having his UI visible
2. added continue buttons to the scene also in that case if you used SetContinueMode(false); u still can see continue button for the player if the NPC started the chat.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Hi,

Here's an updated example: CorgiBackAndForthExample_2018-10-01.unitypackage
Ramezov wrote: Mon Oct 01, 2018 4:42 am1. in the back and forth 2nd example scene , if the NPC started the chat ( I changed the conversation so NPC start saying Hi) the player keeps having his UI visible
Deactivate the PlayerSubtitlePanel in the player prefab.
Ramezov wrote: Mon Oct 01, 2018 4:42 am2. added continue buttons to the scene also in that case if you used SetContinueMode(false); u still can see continue button for the player if the NPC started the chat.
Remember to assign the continue button to the Standard UI Subtitle Panel component's Continue Button field so the subtitle panel knows how to hide and show it.
Post Reply