Hi Im new to Dialogue system and Unity
I have been learning to customize the dialogue system UI and was wondering if there is a way to hide subtitle elements except portrait image during response.
Currently I have all the subtitle elements hide during response.
Thanks
Show only Portrait image during response
Re: Show only Portrait image during response
Hi,
Thanks for using the Dialogue System!
The portrait image is part of the subtitle panel. If the subtitle panel's Visibility is set to Only During Content, all of the UI elements assigned to the subtitle panel (including the portrait image) will disappear when the subtitle panel disappears. If Visibility is set to some other value such as Until Superceded or Always Once Shown, all subtitle panel elements will stay visible during the response menu.
Here are two options to change that behavior:
1. Set the subtitle panel's Visibility to Always From Start, Always Once Shown, or Until Superceded. This will keep the entire subtitle panel visible when the response menu appears. But then configure the response menu's OnOpen() to hide the individual subtitle panel elements that want hidden during the response menu. The unitypackage below contains two examples scenes. The first scene hides individual subtitle panel elements. In this scene, I put the other subtitle elements in a child GameObject named Interior Panel. The response menu's OnOpen() method deactivates Interior Panel, and the subtitle panel's OnFocus() method reactivates it.
2. Or separate the portrait image from the subtitle panel. In the second example scene below, I removed the NPC subtitle panel's Portrait Image and added a Permanent Portrait Image to the Dialogue Panel. Then I added a short script to the dialogue UI that sets Permanent Portrait Image.
DS_KeepPortraitImageVisibleExamples_2022-07-03.unitypackage
Thanks for using the Dialogue System!
The portrait image is part of the subtitle panel. If the subtitle panel's Visibility is set to Only During Content, all of the UI elements assigned to the subtitle panel (including the portrait image) will disappear when the subtitle panel disappears. If Visibility is set to some other value such as Until Superceded or Always Once Shown, all subtitle panel elements will stay visible during the response menu.
Here are two options to change that behavior:
1. Set the subtitle panel's Visibility to Always From Start, Always Once Shown, or Until Superceded. This will keep the entire subtitle panel visible when the response menu appears. But then configure the response menu's OnOpen() to hide the individual subtitle panel elements that want hidden during the response menu. The unitypackage below contains two examples scenes. The first scene hides individual subtitle panel elements. In this scene, I put the other subtitle elements in a child GameObject named Interior Panel. The response menu's OnOpen() method deactivates Interior Panel, and the subtitle panel's OnFocus() method reactivates it.
2. Or separate the portrait image from the subtitle panel. In the second example scene below, I removed the NPC subtitle panel's Portrait Image and added a Permanent Portrait Image to the Dialogue Panel. Then I added a short script to the dialogue UI that sets Permanent Portrait Image.
DS_KeepPortraitImageVisibleExamples_2022-07-03.unitypackage
Re: Show only Portrait image during response
Thank you for the detailed explanation and the package!
I checked all the scenes and was able to implement it on my game using the first method
Have a great day
I checked all the scenes and was able to implement it on my game using the first method
Have a great day
Re: Show only Portrait image during response
Glad to help!