Some SequencerCommand behaviour changed after updating version to latest.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Some SequencerCommand behaviour changed after updating version to latest.

Post by fkkcloud »

Hello,

I was using the below sequence commands to give "delay" for response from player's choice.

Code: Select all

// below are code that is under shortcut "{{pc2}}"
HidePanel(0);
HidePanel(1);
HidePanel(2);
HidePanel(3);
HidePanel(4);
HidePanel(5);
HidePanel(6);
HidePanel(7);
required SetDialoguePanel(false)@0.1;
required Continue()@2;
required SetDialoguePanel(true)@2.1;

Code: Select all

 void OnConversationLine(Subtitle subtitle)
    {

         // Add to pc response Sequence
         var isLastNode = !DialogueManager.currentConversationState.hasAnyResponses;
         if (subtitle.speakerInfo.isPlayer && _showedMenu && subtitle.speakerInfo.nameInDatabase == "Player")
         {
             if (isLastNode)
             {
                 subtitle.sequence += "Continue();";
             }
             else
             {
                 subtitle.sequence += "{{pc2}}";
             }
             
             _showedMenu = false;
         }

    }
It usually hides the panel for 2 seconds and brings back the response right after.

Now, it just goes to the next node right away and skip the very next response.
화면 캡처 2021-10-22 002144.jpg
화면 캡처 2021-10-22 002144.jpg (95.81 KiB) Viewed 579 times
Also, it does a quick flicker(showing the NPC panel quickly for about 1-2 frames then disappearing to show gradual opacity 0-1 animation reveal) every time it starts a new dialogue with a new panel instantiated. (Yes, all the animator has Hidden as Start state which sets the Canvas Alpha to be 0 but it was somehow not called. Dialogue panels were all disabled and it seemed like it was disabled before the animator get to set itself to the "start" node?)

here are my DialogueSystemController settings.
화면 캡처 2021-10-22 002242.jpg
화면 캡처 2021-10-22 002242.jpg (221.28 KiB) Viewed 579 times
I dont know if this change affected these results?
- Fixed: Moved sequencer command processing back to Update, with sequencer messages queued for LateUpdate.
Also, where do I find previous versions? I might want to roll back just in case.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some SequencerCommand behaviour changed after updating version to latest.

Post by Tony Li »

Hi,

I PM'ed you your access info for the customer download site where you can download older versions.

In your {{p2}} shortcut, you can remove "required" from all sequencer commands except the last one.

I don't think the sequencer message change in 2.2.21 affects this issue. Your sequence isn't using messages -- e.g., @Message() syntax.

Try setting the Dialogue Manager's Other Settings > Debug Level to Info. Then trace through the Console logs. It should indicate what is making it skip the node.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Some SequencerCommand behaviour changed after updating version to latest.

Post by fkkcloud »

I PM'ed you your access info for the customer download site where you can download older versions.
I've tested with older versions and the problem exists.
In your {{p2}} shortcut, you can remove "required" from all sequencer commands except the last one.
I did remove "required" except the last one and it's working again. All I did is to update my project from Unity 2019 LTS to 2020 LTS so maybe that was why? In the "info level debug, it was doing 2-time Continue() for the previous shortcut. However, it was working all good all along with Unity 2019. I am not 100% sure why it works.

I am still looking into the first node flickering issue. The start node seems to be not activated because if it was, it should've made the canvas alpha to be 0 for the corresponding UI Panel (NPC or Player, etc).
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some SequencerCommand behaviour changed after updating version to latest.

Post by Tony Li »

Hi,

As a rule, don't use 'required' with 'Continue()'. It can cause problems. (If you're already continuing, there's no need to require the Continue() command to run.)

For the flicker, you can try configuring the subtitle panel's OnOpen() event to set the alpha to zero. This way it should initialize the alpha before playing the animations.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Some SequencerCommand behaviour changed after updating version to latest.

Post by fkkcloud »

As a rule, don't use 'required' with 'Continue()'. It can cause problems. (If you're already continuing, there's no need to require the Continue() command to run.)
That makes sense and thanks for the explanation.
For the flicker, you can try configuring the subtitle panel's OnOpen() event to set the alpha to zero. This way it should initialize the alpha before playing the animations.
Yeah making Canvas Alpha manually zero by setting it in Prefab or with OnOpen() works. I literally have same setting as other Animator (example provided) where its Hidden with Alpha being 0 as Layer Default State. I can't understand why its does not set to Default State first before it goes onto Show state. :(
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Some SequencerCommand behaviour changed after updating version to latest.

Post by Tony Li »

Hi,

You can try to pause the game when the conversation starts. Then step through frame by frame while keeping an eye on the Animator window.
Post Reply