Cloned Bark UI triggering on scene changes

Announcements, support questions, and discussion for the Dialogue System.
User avatar
rykaan
Posts: 75
Joined: Tue Feb 11, 2020 6:22 am

Cloned Bark UI triggering on scene changes

Post by rykaan »

Hi Tony,

Sorry to bug you about the Bark UI's again so soon but I've run into another issue that I'm having a problem tracking down.
During gameplay something appears to send a blank Bark to every Actor in the scene. After this has been triggered, every scene change causes this to occur again when loading in. See the image below:
triggered bark Ui.jpg
triggered bark Ui.jpg (92.76 KiB) Viewed 1776 times
It's got to be something I've done in code. But I don't know what could trigger every actor to bark nothing on scene loads. Let me know what information would be useful to have here, I'm struggling to figure out where I should be looking for this one.

Cheers,
Rob
User avatar
Tony Li
Posts: 21986
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cloned Bark UI triggering on scene changes

Post by Tony Li »

When the scene changes, does every character's bark UI show that blank bubble simultaneously as soon as the scene starts?

Have you tried temporarily setting the Dialogue Manager's Other Settings > Debug Level to Info? The Console logs might shed some light on the issue.

You could also put a breakpoint on the bark UI's Bark() method in your code editor. Your code editor should be able to show you the stack trace, which is the sequence of method calls that resulted in the call to Bark().

If that doesn't help, feel free to send me a reproduction project.
User avatar
rykaan
Posts: 75
Joined: Tue Feb 11, 2020 6:22 am

Re: Cloned Bark UI triggering on scene changes

Post by rykaan »

Hi Tony,

I tried using the Info mode on the Dialogue Manager but I can't find a 'Mass Bark' message showing up. I've sent through a reproduction project, hopefully that can shed some light on this. I must have made some dumb script error somewhere, but the trigger for this issue is a real pain to nail down.

Cheers,
Rob
User avatar
Tony Li
Posts: 21986
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cloned Bark UI triggering on scene changes

Post by Tony Li »

Hi,

Thanks for sending the repro project. I'm downloading it now. I'll reply back by the end of the day.
User avatar
Tony Li
Posts: 21986
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cloned Bark UI triggering on scene changes

Post by Tony Li »

Hi Rob,

Leave the NPCs' Bark UI GameObjects active. This lets StandardBarkUI.Start() initialize the component. If you don't want it to be visible, disable the Canvas component.

Also, I saw the same issue you reported earlier where the bark text was too big. I ticked the Horizontal Layout Group's Control Child Size > Width, and that seemed to fix it.
User avatar
rykaan
Posts: 75
Joined: Tue Feb 11, 2020 6:22 am

Re: Cloned Bark UI triggering on scene changes

Post by rykaan »

Hi Tony,

I think I was playing with the layout group options to try and figure out this new issue so may have left the wrong options ticked before sending you the project. Thanks for confirming that issue for me.

Did the blank bark issue stop occurring for you after turning all the Bark UI GameObjects back on then? I did remove a lot of the Bark UI's from the monsters and instead reference an unattached prefab instead, would that have affected it? I have re-enabled 'Sister's ' Bark UI since that had been disabled.

Sorry for not getting back to you faster, I live in the UK so we're a little out of sync for these exchanges.

Cheers,
Rob
User avatar
Tony Li
Posts: 21986
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cloned Bark UI triggering on scene changes

Post by Tony Li »

Hi Rob,

Yes. If you set the prefab's GameObject active and any NPCs' instances active, it should fix the bark issue.
User avatar
rykaan
Posts: 75
Joined: Tue Feb 11, 2020 6:22 am

Re: Cloned Bark UI triggering on scene changes

Post by rykaan »

Hi Tony,

It doesn't look like changing the prefab gameObjects to active did it sadly. I have uploaded a video to show the moment the issue triggers and how it continues to trigger when changing between scenes, including between scenes with no bark Ui's at all (main menu).



I think something must be triggering a change in either a Game Manager or Dialogue Manager script that is then pinging all the Bark UI's in the scene on scene load. But I can't work out what can even cause that. Hope the video gives a better idea of what it is, or at least what it isn't.

Cheers
Rob
User avatar
Tony Li
Posts: 21986
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cloned Bark UI triggering on scene changes

Post by Tony Li »

That little flash of the bark UI when the scene starts is because the bark UI is playing its Hide animation.

The StandardBarkUI's Start method should disable the bark UI's Canvas at the start of the scene, so it shouldn't be visible.

If that isn't working for some reason, you could just disable the Canvas component in your bark UI prefab. When the NPC barks, it will automatically enable the Canvas.
User avatar
rykaan
Posts: 75
Joined: Tue Feb 11, 2020 6:22 am

Re: Cloned Bark UI triggering on scene changes

Post by rykaan »

Just tried disabling the canvas in the prefab but the issue still occurs. Once it has been triggered in the level at some point it then triggers on scene changes. It works fine until whatever trigger it is sets it off :(.
Post Reply