[BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
WeiYiHua
Posts: 22
Joined: Mon Mar 25, 2024 10:27 pm

[BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by WeiYiHua »

In version 2.2.56, due to changes in the parameters passed to OnBarkEnd, the IsActorMe check in StandardBarkUI.OnBarkEnd now always returns false, which breaks its functionality.

This might be considered a breaking change, since altering the parameters of methods like OnBarkEnd could not only introduce issues in the internal code but might also affect user scripts that rely on these parameters. (Fortunately, I don’t have any scripts depending on these parameters.)

Could you please investigate this? Thank you!
User avatar
Tony Li
Posts: 23457
Joined: Thu Jul 18, 2013 1:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by Tony Li »

Hi,

This change fixes a bug. It corrects OnBarkEnd(Transform) to work the way it was intended and advertised in the manual. I understand that it might break any user code that depended on the previous incorrect implementation. But this is a fairly obscure method that is not very commonly used anyway. To know which character actually barked the line, please use OnBarkLine(Subtitle).
WeiYiHua
Posts: 22
Joined: Mon Mar 25, 2024 10:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by WeiYiHua »

Do you know how to fix StandardBarkUI.OnBarkEnd?
Sometimes I trigger barks for both the speaker and listener at the same time, and their bark durations vary. Simply removing the IsActorMe check would cause both of their barks to be hidden simultaneously.

It seems that keeping the previous logic for StandardBarkUI.OnBarkEnd is no longer appropriate.
User avatar
Tony Li
Posts: 23457
Joined: Thu Jul 18, 2013 1:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by Tony Li »

I'll work on a fix for this and provide a patch here. This was an unintended side effect of the bug fix for OnBarkEnd.
WeiYiHua
Posts: 22
Joined: Mon Mar 25, 2024 10:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by WeiYiHua »

I’ll temporarily revert to the previous version and look forward to your fix!
User avatar
Tony Li
Posts: 23457
Joined: Thu Jul 18, 2013 1:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by Tony Li »

Hi,

Would you please confirm that this patch works as desired in your project?

DS_BarkPatch_2025-07-20.unitypackage

Upon evaluation, I had to add a new method OnBarkEndSpeaker(Transform) that always passes the speaker (barker).
WeiYiHua
Posts: 22
Joined: Mon Mar 25, 2024 10:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by WeiYiHua »

Your patch has fixed this bug, thank you!
WeiYiHua
Posts: 22
Joined: Mon Mar 25, 2024 10:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by WeiYiHua »

Hey, I’d like to mention an old bug I came across. In BarkController, the calculation of endDuration in PlayBarkSequence uses MinSubtitleSeconds and SubtitleCharsPerSecond instead of MinBarkSeconds and BarkCharsPerSecond.

This causes the calculated end time of my Bark Sequence to differ from the Bark’s own end time. Is this the intended behavior?
User avatar
Tony Li
Posts: 23457
Joined: Thu Jul 18, 2013 1:27 pm

Re: [BUG] OnBarkEnd Parameter Change Breaks StandardBarkUI

Post by Tony Li »

Thanks for reporting that. I'll fix it in the next update.
Post Reply