Page 1 of 1

How do I hide a text panel if nothing's been said yet?

Posted: Sat Aug 24, 2019 3:52 pm
by AoF
Whenever you click on a character in my game, it pops up a dialogue choice. Because of this, the dialogue window doesn't have any text yet and I think it looks kind of weird that it's blank:



How do I hide it in this situation? I'm sure SetActive could be used for this, but I'm wondering if there's a setting that's a more natural way to deal with this? Also, I've experienced things breaking unless you SetActive on the exact right GameObject, so if that's the right way to go about it, which GameObject should I set it to false on?

Here's my hierarchy:


Re: How do I hide a text panel if nothing's been said yet?

Posted: Sat Aug 24, 2019 9:47 pm
by Tony Li
It looks like you just need to change the PC Subtitle Panel's Visibility dropdown to any value other than Always From Start.

Re: How do I hide a text panel if nothing's been said yet?

Posted: Sat Aug 24, 2019 10:10 pm
by AoF
That didn't seem to work for me:



I tried another setting and it still showed up.

It might help to see my conversation:



All characters share the same subtitle panel. Perhaps that Hub counts as Kira saying something and makes it show up? That hub is blank though. And now that I think about it, it doesn't make sense to me that it says Player below when they have not been involved in the conversation yet. But, that may be an unrelated point.

Re: How do I hide a text panel if nothing's been said yet?

Posted: Sat Aug 24, 2019 10:12 pm
by AoF
I see now that it kind of worked, but the Text Panel is still showing its image. Is there a way to prevent that? Why does it work that way?

Re: How do I hide a text panel if nothing's been said yet?

Posted: Sat Aug 24, 2019 10:23 pm
by Tony Li
It's because the "Text Panel" GameObject isn't controlled by anything, so nothing hides it. It's active whenever the Dialogue Panel is active.

Since you're revamping your UI, you might want to move/merge it into Subtitle Panel 1. The Basic Standard Dialogue UI prefab might provide a good example structure for your UI.

Re: How do I hide a text panel if nothing's been said yet?

Posted: Sat Aug 24, 2019 11:24 pm
by AoF
Cool, I did that and it fixed the problem. Thanks!

Re: How do I hide a text panel if nothing's been said yet?

Posted: Sun Aug 25, 2019 9:20 am
by Tony Li
Great! Glad to help.