Page 1 of 2

Cloned Bark UI triggering on scene changes

Posted: Fri Aug 27, 2021 11:27 am
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 1780 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

Re: Cloned Bark UI triggering on scene changes

Posted: Fri Aug 27, 2021 1:21 pm
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.

Re: Cloned Bark UI triggering on scene changes

Posted: Fri Aug 27, 2021 2:22 pm
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

Re: Cloned Bark UI triggering on scene changes

Posted: Fri Aug 27, 2021 2:35 pm
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.

Re: Cloned Bark UI triggering on scene changes

Posted: Fri Aug 27, 2021 4:35 pm
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.

Re: Cloned Bark UI triggering on scene changes

Posted: Sat Aug 28, 2021 12:22 pm
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

Re: Cloned Bark UI triggering on scene changes

Posted: Sat Aug 28, 2021 1:26 pm
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.

Re: Cloned Bark UI triggering on scene changes

Posted: Tue Aug 31, 2021 8:19 am
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

Re: Cloned Bark UI triggering on scene changes

Posted: Tue Aug 31, 2021 9:13 am
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.

Re: Cloned Bark UI triggering on scene changes

Posted: Tue Aug 31, 2021 10:08 am
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 :(.