Hey,
So i'm trying to work a few things currently, and maybe just not having a complete understanding of how the canvas and dialogue manager interact with each other is holding me back.
Curently I am trying to have a menu thathas an option to take the player to three other screens. One doesn't need the dialogue system so is just enabling a new panel. Another screen, taking the player to emails let's say, will need the dialogue manager.
I currently have it set up so that it triggers a conversation on an empty game object, but the UI for that conversation isn't appearing. Any help would be greatly appreaciated thank you.
Set conversation/UI from button click
Set conversation/UI from button click
- Attachments
-
- Profile.JPG (25.01 KiB) Viewed 1212 times
-
- CommsButton.JPG (105.82 KiB) Viewed 1212 times
-
- CommDialogue.JPG (99.66 KiB) Viewed 1212 times
Re: Set conversation/UI from button click
Hi,
If I understand you correctly, you want conversations involving the computer to use a different dialogue UI from the default dialogue UI assigned to the Dialogue Manager's Display Settings > Dialogue UI field, correct?
(If you want all conversation to use this dialogue UI by default, assign it to the Dialogue Manager's Dialogue UI field.)
If that's correct, does the computer exist in only one scene, or is it available regardless of the current scene?
If the computer exists in only one scene, set it up like this:
If I understand you correctly, you want conversations involving the computer to use a different dialogue UI from the default dialogue UI assigned to the Dialogue Manager's Display Settings > Dialogue UI field, correct?
(If you want all conversation to use this dialogue UI by default, assign it to the Dialogue Manager's Dialogue UI field.)
If that's correct, does the computer exist in only one scene, or is it available regardless of the current scene?
If the computer exists in only one scene, set it up like this:
- Put your computer-specific dialogue UI in a Canvas in a GameObject in the scene. This dialogue UI should have a fully-configured Standard Dialogue UI component. (See Dialogue UIs.) Alternatively, save the computer-specific dialogue UI as a prefab.
- Put your computer GameObject in the scene. Add an Override Dialogue UI component to the GameObject. Assign the dialogue UI to it (either a scene instance or a prefab).
- In your Dialogue System Trigger, assign the computer GameObject as the Conversation Conversant.
- If you're not using the computer-specific dialogue UI as a prefab, put it in a Canvas that's a child of the Dialogue Manager's hierarchy. To understand why, see: How To: Manage Player Controls and Scene Changes.
Re: Set conversation/UI from button click
I there and thanks for the response. I think that my issue is more that the panel that takes the player to the new dialogue UI isn't a dialogue UI, it is just a canvas.
I have attached the image of it's current state below. The middle button is to take the player to a new UI, that will display a conversation. Whilst the left button will take the player to a new panel that will just show static information.
I have attached the image of it's current state below. The middle button is to take the player to a new UI, that will display a conversation. Whilst the left button will take the player to a new panel that will just show static information.
- Attachments
-
- UIscreen.JPG (51.7 KiB) Viewed 1208 times
Re: Set conversation/UI from button click
Hi,
Got it. Add a Dialogue System Trigger component to the Communications button. Configure the Button component's OnClick() event to call the Dialogue System Trigger's OnUse:
Got it. Add a Dialogue System Trigger component to the Communications button. Configure the Button component's OnClick() event to call the Dialogue System Trigger's OnUse:
Re: Set conversation/UI from button click
Hi Tony,
Thanks for getting back to me so quickly. That makes sense, but unfortunately my "computer UI" Isn't appearing OnUse. I have the Canvas in the dialogue manager, the UI for the computer as a child below it, and those peices all together in the inspector. (I can use my terminal UI in the Dialogue UI as it is the only dialogue UI being used can't I?)
In my other canvas, which is really just a game menu, on the Communications button I have my trigger, and my onClick event, but the UI unfortunately isn't appearing, although i know the conversation is taking place.
Sorry for the trouble and thank you again.
Thanks for getting back to me so quickly. That makes sense, but unfortunately my "computer UI" Isn't appearing OnUse. I have the Canvas in the dialogue manager, the UI for the computer as a child below it, and those peices all together in the inspector. (I can use my terminal UI in the Dialogue UI as it is the only dialogue UI being used can't I?)
In my other canvas, which is really just a game menu, on the Communications button I have my trigger, and my onClick event, but the UI unfortunately isn't appearing, although i know the conversation is taking place.
Sorry for the trouble and thank you again.
- Attachments
-
- TerminalProfile.JPG (30.82 KiB) Viewed 1207 times
-
- DialogueManager.JPG (112.1 KiB) Viewed 1207 times
-
- CommsButton.JPG (94 KiB) Viewed 1207 times
Re: Set conversation/UI from button click
Hi there, at the moment I have now managed to get this to work. I deleted the Dialogue Manager, added it again and then added a prefab of the Terminal Dialogue UI to the Manager and now it appears to be working. Thank you for your help again.
Re: Set conversation/UI from button click
Hi,
Great! From reading through your last post, I think that's all that was needed. If you need to use multiple dialogue UIs in the future and have questions, just ask and I'll do my best to help.
Great! From reading through your last post, I think that's all that was needed. If you need to use multiple dialogue UIs in the future and have questions, just ask and I'll do my best to help.