4.6 UI Barks Will Not Show

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bautistac
Posts: 14
Joined: Tue Jan 06, 2015 5:31 pm

4.6 UI Barks Will Not Show

Post by bautistac »

Hello,



I just purchased the Dialogue System and after following the tutorials/manual, I cannot get the text window for my barks to display.



I imported the Unity UI package and tried with the supplied panel. When I hit play, the panel disappears and does not return. The text field is receiving the new text, but the Canvas component on the main panel stays disabled.



My ultimate goal is to set up a narrator that barks messages to the player to guide them along. I am aiming to get these to collect into a screen space message box that the player can scroll through, later. I don't exactly need to display the messages on a world space canvas. I chose to use barks because I am not looking to ever have responses to these messages, but if normal dialog is better for this, I don't mind switching.



Any help would be appreciated.


User avatar
Tony Li
Posts: 21020
Joined: Thu Jul 18, 2013 1:27 pm

4.6 UI Barks Will Not Show

Post by Tony Li »

Hi,



Thanks for buying the Dialogue System! Barks are probably the best choice for what you described. It's normal for the bark panel to disappear on start. It's only reactivated while barking.



Here are two things to check:



1. Make sure your scene has an EventSystem. (GameObject > UI > EventSystem)



2. Make sure the panel is a child of a Canvas.



For #2, you may want to open the example scene (Dialogue System/Scripts/Supplemental/

UI/Example/Example) to see how it's set up. Expand Actors/Sergeant Graves/SF Unity UI Bark UI. You'll see that "SF Unity UI Bark UI" has a Canvas component. Its child, Panel, contains subchildren for two Text elements: Name Text and Bark Text.



If the suggestions above don't help, please feel free to email an example project to tony (at) pixelcrushers.com. I'll be happy to take a look.



Once you get this issue resolved, collecting barks into a screen space message box will be fairly simple. You can write a very small script that listens for the OnBarkStart() message and adds the bark text to the message box.
bautistac
Posts: 14
Joined: Tue Jan 06, 2015 5:31 pm

4.6 UI Barks Will Not Show

Post by bautistac »

Thanks for your reply, Tony.



I managed to get the text to display properly in my canvas. I am really unsure of what the problem was, as I started the process from the beginning once again and the issue resolved itself.



I am now trying to force the messages to play in a sequence. I have my bark conversation set up one level deep and each message has a sound. I have an AudioWait(clippath) set up for each message in the sequence box and they are playing correctly. I can get the new message to display each time I enter a trigger box, but how would I go about having them automatically play in order once each audio clip completes? Can I do this from the Dialogue System or do I need to write a script to help?


User avatar
Tony Li
Posts: 21020
Joined: Thu Jul 18, 2013 1:27 pm

4.6 UI Barks Will Not Show

Post by Tony Li »

You don't need to write a script.



Please disregard my previous recommendation to use barks. Since you want to play several dialogue entries in a row, one after the next, I recommend running them in a conversation instead of barks, and use a Bark Dialogue UI. (<- This link contains more details and instructions.)



This will be easier because the conversation will automatically move from one dialogue entry to the next. Here are the steps:



1. Assign the narrator as the speaker of every dialogue entry; all nodes (except START) should be gray, not blue. And link them one after the other, in the order they should play.



2. Add an Override Dialogue UI component to the narrator. (If you want to override more than just the dialogue UI, add an  Override Display Settings instead.)



3. Create an empty GameObject, and add a Bark Dialogue UI component to it. You can make it a child of the narrator if you want. Assign this GameObject to the Override Dialogue UI's "UI" field.



4. Keep the Bark UI component on the narrator, but replace the bark trigger with a conversation trigger.



Now when you play a conversation on the narrator, it will play the dialogue entries in order using the narrator's bark UI.







If you want to continue with barks instead, define a Number variable in your dialogue database. For example, call it LineNum, and set it to 1. In the first dialogue entry, set these fields:



Conditions: Variable[LineNum] == 1

Script: Variable[LineNum] = 2



In the next dialogue entry, increase the numbers, and so on.



Then add a Bark On Dialogue Event component. Set the Trigger to OnBark, and add an element to the OnEnd section. Set this to the same conversation as the bark trigger.



When the first bark finishes playing, it will send an OnBarkEnd message to the narrator. This will trigger Bark On Dialogue Event, which will play the next bark, and so on.
bautistac
Posts: 14
Joined: Tue Jan 06, 2015 5:31 pm

4.6 UI Barks Will Not Show

Post by bautistac »

I have switched my barks over to a conversation and everything is working the way I need it to.



Thank you for the help.
User avatar
Tony Li
Posts: 21020
Joined: Thu Jul 18, 2013 1:27 pm

4.6 UI Barks Will Not Show

Post by Tony Li »

Happy to help! :-)
Post Reply