In my project, I tried to make dialogue system act like Japanese visual novel.
In my game I will show the player some exquisite background and tachie, so I would like the player can hide part of the dialogue box.
I wrote a script to complete this feature, but I encountered a small problem.
The NPC name not hide. I can't even close it manually in the inspector.
How do I fix this bug?
Hide part of dialogue panel in conversation
Re: Hide part of dialogue panel in conversation
Hi,
The images didn't come through in your post.
If you want to hide the dialogue UI, you can use the SetDialoguePanel(false) sequencer command or disable the canvas. To disable the canvas, give the Dialogue Manager's canvas a unique name such as "DialogueCanvas". Then use SendMessage(DialogueCanvas, false).
The images didn't come through in your post.
If you want to hide the dialogue UI, you can use the SetDialoguePanel(false) sequencer command or disable the canvas. To disable the canvas, give the Dialogue Manager's canvas a unique name such as "DialogueCanvas". Then use SendMessage(DialogueCanvas, false).
Re: Hide part of dialogue panel in conversation
My purpose is not hide all canvas, but only subtitle and NPC name. Portrait image should still be visible even in hide state.
This is my code and conversation in visible state.
In invisible state NPC name is still visible.
I would like hide NPC name and keep portrait image visible in invisible state.
This is my code and conversation in visible state.
In invisible state NPC name is still visible.
I would like hide NPC name and keep portrait image visible in invisible state.
Re: Hide part of dialogue panel in conversation
Hi,
I'm not sure what's going on there. (Feel free to send a reproduction project to tony (at) pixelcrushers.com if you like.)
Another way to handle it would be to move the Portrait Name GameObject to be a child of the Text Panel's hierarchy. Add a Canvas Group the Text Panel. To hide everything except the portrait(s), set the Text Panel's Canvas Group Alpha to zero. This has two advantages:
I'm not sure what's going on there. (Feel free to send a reproduction project to tony (at) pixelcrushers.com if you like.)
Another way to handle it would be to move the Portrait Name GameObject to be a child of the Text Panel's hierarchy. Add a Canvas Group the Text Panel. To hide everything except the portrait(s), set the Text Panel's Canvas Group Alpha to zero. This has two advantages:
- You only need to change one property instead of managing the active/inactive states of 3 separate GameObjects.
- You can animate the Alpha value from one to zero to fade out instead of disappearing immediately.