Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Dialogue System for Unity - easy conversations, quests, and more!

Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @sacb0y - Without Cinemachine (e.g., using Camera() sequencer commands), it's easy. At the end of the conversation, the Dialogue System guarantees that the camera returns to its pre-conversation position.

    With Cinemachine, what about this solution:
    1. Add a Dialogue System Events component to the primary NPC or whatever GameObject is the conversation's conversant.
    2. Configure OnConversationStart() to deactivate the gameplay vcam.
    3. Configure OnConversationEnd() to reactivate the gameplay vcam and deactivate all of the other vcams.
    If you prefer, add a script like the one below instead of a Dialogue System Events component. This way you can drag all your vcams into the Conversation Cameras list in one action, which is quicker than setting up a UnityEvent.
    Code (csharp):
    1. using UnityEngine;
    2. using PixelCrushers.DialogueSystem;
    3. public class HandleConversationCameras : MonoBehaviour
    4. {
    5.     public GameObject gameplayGamera;
    6.     public GameObject[] conversationCameras;
    7.  
    8.     void OnConversationStart(Transform actor)
    9.     {
    10.         gameplayCamera.SetActive(false);
    11.     }
    12.  
    13.     void OnConversationEnd(Transform actor)
    14.     {
    15.         gameplayCamera.SetActive(true);
    16.         foreach (var cam in conversationCameras) { cam.SetActive(false); }
    17.     }
    18. }
    I actually prefer to control vcams using the CinemachinePriority() sequencer command because it can specify whether to cut or ease into a vcam. In this case, I'd set all of the vcams' priorities to zero:
    Code (csharp):
    1. using UnityEngine;
    2. using Cinemachine;
    3. using PixelCrushers.DialogueSystem;
    4. public class HandleConversationCameras : MonoBehaviour
    5. {
    6.     public CinemachineVirtualCamera gameplayGamera;
    7.     public CinemachineVirtualCamera[] conversationCameras;
    8.     private int originalGameplayPriority;
    9.  
    10.     void OnConversationStart(Transform actor)
    11.     {
    12.         originalGameplayPriority = gameplayCamera.Priority;
    13.         gameplayCamera.Priority = 0;
    14.     }
    15.  
    16.     void OnConversationEnd(Transform actor)
    17.     {
    18.         gameplayCamera.Priority = originalGameplayPriority;
    19.         foreach (var vcam in conversationCameras) { vcam.Priority = 0; }
    20.     }
    21. }

    In the conversation's first dialogue entry, make sure to activate a vcam. During the conversation, you can activate and deactivate vcams whenever you want using SetActive(). They don't have to be tied to Lipsync.

    For example:

    upload_2019-7-19_20-14-54.png

    The first entry doesn't show any subtitles. It cuts immediately to the vcam "Feet". After 1 second it switches to the vcam "Alley" and allows it to ease into position.

    The second entry only plays LipSync.

    The first entry cuts to the vcam "Alley2", then after 1 second eases into vcam "Student".

    You'd want to add Feet, Alley, Alley2, and Student to the script's Conversation Cameras list (or to the Dialogue System Events component if that's what you end up using).

    ---

    If the conversation is non-interactive, another approach is to use Timeline. (Dialogue System manual: Cinemachine & Timeline)
     
  2. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    I think i'll probably just use the conversaiton start and conversation end method then, i'll have to do an auto populate though with bolt cause i would expect 100's of vitual cameras to keep track of.

    As for priority.

    Activating vcam objects works the same as priority actually, it just doesn't require value changes. Though I don't know if the sequencer commands will work out that way, but i usually use the blend controller in cinemachine brain anyway to control cuts.

    But yeah so for example if I want to let players activate a POV camera at any time during a dialogue (like MGS3-4) I can do that. Cause all cinematic cameras have the same or similar priority (meaning they're overwritten by a new activation), and the POV is always higher. To me this has more control and consistency. Since i'm dealing with potentially 100's of cameras most of which i'll only use once.

    This is also the reason i don't use timelines, is because timelines don't work with the transition between these cameras. It always overrides with a timeline, so unless i use another timeline to override the timeline the POV camera activation or priority itself won't work. I personally considered all that troublesome so i only use timelines for positioning and some other minor stuff.

    Thanks for your help btw!
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Glad to help! Sounds like you have a good plan now.
     
  4. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    How do I setup a button to advance dialogue? For some reason I cant click or do anything. How do I change the button?

    I see the click highlight but when i click, nothing happens. could it be a canvas problem? im using the adventure creator bridge.


    Also im trying to setup the text message lobby but im having difficulties with the instructions. I want to it to work across multiple scenes and save the conversation but the tutorial only seems like it's setup to work on 1 scene.

    Can you please setup a demo scene with 2 conversations,
     
    Last edited: Jul 20, 2019
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi,
    Are you trying to use Adventure Creator and Textline together?

    If the button highlights when you hover or click on it, then it's probably not a canvas problem. Which button? A response button or a continue button?

    If you're using Textline, to set up multiple SMS-style conversations see the Multiple Conversations section on page 3 of the Textline manual. Here's the download link to the latest version of Textline, which includes a Lobby (i.e., multiple conversations) example: Textline
     
  6. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200

    Yes im trying to use adventure creator and textline together. I want to create a text message system where i can receive different texts from different contacts at different times in different scenes over the course of the game.

    Basically I couldnt click the continue button or even click and answer choice but ive fixed it. I just had to increase the sort order.

    How do I use an input button to advance covnersation. If I want to use keyboard controls to navigate a conversation like if they were 3 options to choose from.

    Can i also assign a button to each individual answer choice?

    I looked at the manual but i didnt understand how to set it up. I'll check out the demo.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Okay. Then you'll want to use the TextlineDialogueUI without the rest of the Textline project. If your game has other conversations that don't use a text message system, use an Override Dialogue UI component to only use the TextlineDialogueUI for text message conversations. Briefly:

    1. Tick the TextlineDialogueUI's Use Conversation Variable checkbox.

    2. Add a GameObject with a DialogueSystemTrigger and an OverrideDialogueUI.

    3. Configure the DialogueSystemTrigger to:
    • Add Action > Run Lua Code: Set the variable "Conversation" to the conversation's title, such as:
      Variable["Conversation"] = "Text With Adam"
    • Add Action > Start Conversation: Start the conversation (e.g., "Text With Adam").
    4. Point the OverrideDialogueUI to the TextlineDialogueUI.

    If you want to use the Unity UI "Submit" input (space bar, enter key, or 'A' button on gamepad), then tick the Dialogue Manager's Input Device Manager > Always Auto Focus. Otherwise, to assign a different input such as 'C' to continue, add a UIButtonKeyTrigger component to the continue button.

    Yes. There are two ways:

    1. Inspect the Standard UI Menu Panel component on the response panel. Tick Autonumber > Enabled. This will assign number keys (1, 2, 3, etc.) to each choice.

    2. Or unassign the Standard UI Menu Panel's Auto-Created Buttons > Button Template and Button Template Holder. Instead, make buttons at design time and assign them to the Buttons list. Add a UIButtonKeyTrigger to each button.
     
  8. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    In a brand new scene with my player character, I add the dialogue manager to the scene with my database I was able to get 1 conversation working.

    When the conversation finishes how do I go back to gameplay? The button starts the conversation with 1 contact, how do I leave the text menu screen and go back to gameplay. The menu button on the top right does nothing.

    When I get to the end of the conversation, it closes the convo text menu screen. When I open it up again, I have to go through the convo again.

    Also just to be sure, "Variable["Conversation"] = "Text With Adam"
    Is the variable above called Conversation?
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @namdo - I've attached an example scene. It's based on AC's 2D Demo, so your project must contain the 2D Demo files, and you must inspect the 2D Demo's ManagerPackage and click 'Assign managers'.

    It has three main UI elements:
    • Messages Button: Opens the Messages Panel. (Button is in bottom center of screen.)
    • Messages Panel: Shows characters you can text with. Each one is a button that starts/resumes the conversation.
    • Textline Dialogue UI: Shows the conversation.
    You can examine how each element is set up to see how it works.
     

    Attached Files:

  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Dialogue System for Unity version 2.1.9 Released

    Version 2.1.9 is now available on the Asset Store!

    This update includes several bug fixes and updates for third party integrations. The welcome window now has a handy set of checkboxes to enable and disable support for features such as Timeline, Cinemachine, Physics2D, and TextMesh Pro, since you can now turn these features on and off in Unity's Package Manager window so it's not guaranteed that every feature will be available in your project.

    NOTE: The next update will set the minimum Unity version to Unity 2017.4. Version 2.1.9 will be the last version that officially supports Unity 5.3 - 2017.3. Unity is ending support for 2017.3 and older, and they're asking publishers to set 2017.4 as the minimum version for assets.


    Release Notes
    Core:
    • CHANGED: If using Timeline or Cinemachine, add USE_TIMELINE / USE_CINEMACHINE defines (can do through Welcome window).
    • Changed: AnimatorPlay[Wait]() sequencer commands now specify fade duration in seconds instead of normalized.
    • Changed: On Watches tab, renamed Update to Refresh to clarify its function.
    • Added: Welcome window has checkboxes to enable/disable optional support features.
    • Added: NavMeshAgent(stop|destination, subject) sequencer command.
    • Improved: Custom sequencer commands now support Awake() method, recommend using Awake() instead of Start().
    • Improved: Dialogue Actor custom subtitle & menu panels can not instantiate at offsets like custom bark panels.
    • Improved: Dialogue Editor node search bar: When cursor is in search bar, Enter key starts search.
    • Fixed: Dialogue Editor node search bar: Clicking on some areas of node editor search bar no longer accidentally opens conversation title dropdown.
    • Fixed: Dialogue Actor typo that could cause a null reference exception.
    • Fixed: If player didn't have Dialogue Actor and NPC had custom response menu, conversations didn't use NPC's response menu.
    • Fixed: If continue button assigned but no event configured, StandardUISubtitlePanel now correctly adds OnContinue() only once.
    • Fixed: UntilSuperceded now also works on custom subtitle panels not assigned to StandardDialogueUI's Subtitle Panels list.
    • Fixed: Menu timeout use current response wasn't working with standard dialogue UI.
    • Improved: Disappear Event's onDisappeared event is now public.
    Third Party Support:
    • articy:draft: Fixed conversion of custom Lua fields that reference articy variables.
    • Behavior Designer: Added Lua functions bdSyncTo/FromLua, Get/Set variable values.
    • Invector: Added support for free version of controller.
    • PlayMaker: Updated GetPortraitImage for compatibility with version 2.1.8+.
    • RT-Voice: RTVoiceActor uses current system language if no language specified for Dialogue System.
    • TopDown Engine: Fixed Unity UI input when conversations play without pausing game.
     
    hopeful and DMRhodes like this.
  11. NoctisFatehart

    NoctisFatehart

    Joined:
    Jul 30, 2014
    Posts:
    28
    Hello, I've been a user of the Dialogue System for a long time and recently I've run into an issue that I just can't seem to get my head around no matter how hard I try.

    Currently, I'm setting up multiple types of "Dialogue sequences" in my project, such as "Cutscene Dialogue", "Overworld Dialogue", etc. All of them are meant to use a different dialogue UI with the dialogue system depending on the type used. I simply cannot figure out an easy method to just change the specific "Dialogue UI" prefab I have set in Dialogue Manager asset via script and during runtime.

    I've checked the documentation and all I've found were the override components, however, those seem to only work if the specific GameObject with it in question is a conversant/actor. I'd just like to independently switch the UI in/out via script if possible without having to utilize any of the components. Is this possible?

    Thank you for any assistance in this matter!
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @mhhj - Yes, set DialogueManager.dialogueUI.
     
  13. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    @TonyLi Thanks for the updates!

    I have some events where my main character receives communication via radio or mobile phone (eg: Deus Ex). My character will respond to these calls ingame without any specific responses.
    This conversation UI to be different from the Standard letterbox UI that I use for regular Conversation(usually cut scenes)

    What kind of setup is required to make this happen? Do you have any examples or videos that I can follow?
    Some reference screenshot from popular games
    Deusex - UI2.PNG
    Deusex - UI.PNG
     
    hopeful likes this.
  14. NoctisFatehart

    NoctisFatehart

    Joined:
    Jul 30, 2014
    Posts:
    28
    Oh, so simple, I must've missed this somehow! I feel like an idiot, thank you so much, much appreciated!
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @mhhj - No worries! Glad I could help.

    Hi @SamRock -
    1. Add your radio dialogue UI to the Dialogue Manager's Canvas, or to another Canvas under the Dialogue Manager if you prefer. Don't replace your letterbox UI. The radio UI will just be an additional one.
    2. Add a GameObject (it can be an empty GameObject) to the Dialogue Manager to represent your radio.
      • Add an Override Dialogue UI component to it. Assign the radio UI.
      • Add a Dialogue Actor component to it. Select your radio actor from the Actor dropdown.
    I'm suggesting that you put the radio and its UI under the Dialogue Manager so they survive scene changes. This way you can use the radio in any scene.
     
    SamRock and hopeful like this.
  16. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Ok so a weird problem where conversation does not end when "endconversation" is run from on click? This didn't happen before but i updated dialogue system recently.

    upload_2019-7-28_14-53-47.png

    I get two strange behaviors, I have a regular mode where it loads everything and a "testing" mode where it just loads only the existing scenes I have.

    In testing mode, the dialogue UI vanishes, but for some reason the dialogue audio will play after the "Endconversation"" button is clicked. Looking at the log i can see the function as run, but i see no information telling me why the audio is playing

    In regular play mode where it loads every thing as a normal play through, the "endconversation" button simply doesn't run. Looking at the log the function is not run, even though it worked before.

    What is happening here? It worked fine before.

    EDIT: Also side note, whats the best way to set up a fade sequence for the start of a scene?

    EDIT: Ok i see whats happening now, when using scene loading, the dialogue systme manager goes to "dontdestoryonload", ok i'll just setup the button with a script instead of using the dialogue system manager object...
     
    Last edited: Jul 28, 2019
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi,
    You beat me to it. :)

    If you're changing scenes, you can use the save system and set up a Scene Transition Manager, like the Dialogue System's Demo. The Demo fades to black before loading the next scene and then fades in from black after loading. You can also configure it to load a loading screen scene in the middle if you want.

    Alternatively, you can add a Dialogue System Trigger set to OnStart. Select Add Action > Play Sequence, and use a sequence like this to fade in from black over 1 second: Fade(in,1)
     
  18. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    What if it's all within the same scene? How do i fade out then fade in? I got weird results before lol.
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Use Fade(stay). The difference between Fade(stay) and Fade(out) is that Fade(stay) stays faded. When Fade(out) finishes, the black cover immediately disappears.

    Here's an example sequence that fades to black, moves a character Orpheus to position2, and then fades back in:

    Code (sequencer):
    1. Fade(stay,1);
    2. MoveTo(position2,Orpheus)@1;
    3. Fade(in,1)@1
     
  20. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    How would i do this with an on enabled trigger?

    So for example, I would add "Fade(stay,1);" to the sequence of the dialogue system trigger.
    Then Fade(in,1); in one of the dialogue chains?

    How does the new unstay function factor into this?
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @sacb0y - Can you please describe what you want to happen?
     
  22. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Basically I have a button that activates an object which has an "OnEnable" dialogue trigger. I just want it to fade out when that trigger starts, then fade in after everything is done begin set up. But often i get stuff set up before the fade out even starts lol, or the fade just flickers instead of working gradually.

    There's no scene loading, and it all happens quickly.

    Also if i wanted to activate a timeline is this in the sequencer or do i have to do it by code?

    https://pixelcrushers.com/dialogue_...sequencer_command_animator_timeline_play.html

    I found this, but i don't see it in the list of sequencer commands?
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Specify timing using the "@" syntax in your sequences. Going back to my previous reply, let's look at this sequence:
    Code (sequencer):
    1. Fade(stay,1);
    2. MoveTo(position2,Orpheus)@1;
    3. Fade(in,1)@1
    1. The first line starts as soon as the Dialogue System Trigger fires. It kicks off a fade out that runs from 0:00 to 0:01.
    2. The second line has "@1". This means it waits until 0:01. Then it moves Orpheus to position2.
    3. The third line also has "@1". It waits until 0:01. Then it kicks off the fade in.
    The key is to include "@1" (or whatever duration you prefer) so you don't try to set stuff up until the fade out is complete.

    You're looking at the old version 1.x documentation. Please use the version 2.x documentation.
    Now that Unity allows projects to add and remove engine features using the Package Manager window, the Dialogue System doesn't assume that Timeline is enabled in your project. To enable Dialogue System support for Timeline:
    • Select menu item Tools > Pixel Crushers > Dialogue System > Welcome Window.
    • Tick the Timeline checkbox to enable Dialogue System support.
    • For good measure, right-click on Plugins / Pixel Crushers / Dialogue System / Scripts and select Reimport. (Not Reimport All.) Then do the same for Plugins / Pixel Crushers / Dialogue System / Wrappers. Some versions of Unity have difficulty knowing when to recompile scripts in Plugins when changing scripting define symbols. This extra step makes sure all the code is compiled and ready to use.
     
  24. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Oh i never noticed that in the welcome menu! thanks!

    I'll try all this!
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    The checkboxes were added to the welcome menu in the latest version (2.1.10). Previous versions assumed that Timeline was always available.
     
  26. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867

    Whats the deal with this error for cinemachine? I enabled the toggle for that since it was there and got this.
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Did you right click on Scripts and select Reimport, and then do the same for Wrappers?
     
  28. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Yeah, i tried that same issue. I'm not really using it atm tho since i'm just using the set active method, so it's fine. Btw i'm using Unity 2018.4.4.

    Also another question whats the best method for fading in the middle of dialogue. There's a thing where the next dialogue line displays before the fade can start.


    EDIT: I tried changing the button from referencing the dialogue system to just putting everything in a single function for my game manager. It works! but for some reason the dialogue system plays the last voice line when the conversation is concluded. And i have no idea why :/

    Worse it does it every time i run the "enddialogue" function. Or even load a new dialogue scene. Playing the last audio line with no actual lipsync occurring.

    And all of this happens with the logs showing nothing about it.

    I'll post a video of it soon...
     
    Last edited: Jul 29, 2019
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @sacb0y - Here's an example scene. It demonstrates:
    • Fading during a conversation.
    • Moving a GameObject while the screen is faded to black.
    • Playing audio on the last node.
     

    Attached Files:

  30. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867


    Here's an example of the audio issue i'm encountering. For some reason every time i click a button for a scene it causes her to replay the last audio file.

    I'm not doing anything special with the sequence either.

    upload_2019-7-29_15-7-50.png

    Only other thing is an end dialogue command for the most part...

    Code (CSharp):
    1. void EndDialogue()
    2.     {
    3.         DialogueManager.StopConversation();
    4.         Player.SetTrigger("end");
    5.         Naomi.SetTrigger("end");
    6.         naomiOutfit.Reset();      
    7.     }
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @sacb0y - What's the reason for EndDialogue(), and when does it get called? What's the reason for not letting the dialogue end normally when it reaches the end of the branch with no more nodes? I'm just trying to understand where there might be potential issues.

    If you temporarily set the Dialogue Manager's Other Settings > Debug Level to Info, it will log two lines whenever it runs a sequencer command such as LipSync(). The first line logs the sequencer parser's understanding of the command. It appears when the dialogue entry node starts. It looks like this:

    Dialogue System: Sequencer: LipSync(ThreeWeeks_Shiyon-06)

    The second line logs when the command actually runs. It looks something like this:

    Dialogue System: Sequencer: LipSync(ThreeWeeks_Shiyon-06(LipSyncData))

    When you EndDialogue() do you see those lines appear again? That is, are they repeated when they shouldn't be?

    Would you please remind me how you're changing scenes?

    Have you changed the Dialogue Manager's Other Settings > Dialogue Time Mode from Realtime to something else? If you're pausing the game while changing scenes, and if you've set Dialogue Time Mode to Gameplay, then the LipSync() command will pause LipSync while the game is paused and resume it when the game is unpaused. It should resume where it left off; it just calls LipSync.Resume(). But maybe there's an issue that's causing it to resume from the beginning. (Just brainstorming.)
     
  32. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Well for this particular scene it doesn't have a use, but it will have a use for other scenes, so i'm just using it now. Basically i would use a similar function for a "Skip Cutscene" button for certain non critical scenes. The same issue occurs if i run the function in the middle of dialogue with whatever the last audio line repeating like the video.

    For now it only returns to the main menu, but later will will serve game function but a similar menu.

    Yes, I've checked this there is no log information for any consecutive audio plays.

    upload_2019-7-29_16-15-36.png

    I'm not using any other setting than realtime, also showing info is configured.

    upload_2019-7-29_16-16-28.png

    Currently everything takes place in one scene. I'm only moving the character around the room and changing their pose. So the system is calling dialogue and just configuring the scene to handle that scenes needs.I don't need to load new scenes currently.

    All it does is activate a game object with a dialogue trigger, then when the button is pressed it ends the dialogue and disables the game object.
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @sacb0y - I'll put together a test scene later today to try to reproduce this.

    What versions of Unity, LipSync, and Dialogue System are you using?
     
  34. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Unity 2018.4.4f1
    Dialogue System 2.1.10
    Lipsync 1.501

    Thanks for your help!
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @sacb0y - Here's an example. I think it does everything you described, but I can't reproduce the issue. You may need to send exact reproduction steps or a reproduction project to tony (at) pixelcrushers.com if you need further help.
     

    Attached Files:

  36. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Hm, ok i'll try and set up a more simplified project.
     
  37. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    OMFG, I am so sorry...

    I realized my error thinking about it some more..."Play on awake" was enabled on the audio source. -_-

    So i guess she would update and it would count as "awake" and the file source would be already registered to the last audio file so it would play that.

    Turning that off it works fine DX

    Sorry for the trouble!
     
    TonyLi and hopeful like this.
  38. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Hi @SamRock -
    1. Add your radio dialogue UI to the Dialogue Manager's Canvas, or to another Canvas under the Dialogue Manager if you prefer. Don't replace your letterbox UI. The radio UI will just be an additional one.
    2. Add a GameObject (it can be an empty GameObject) to the Dialogue Manager to represent your radio.
      • Add an Override Dialogue UI component to it. Assign the radio UI.
      • Add a Dialogue Actor component to it. Select your radio actor from the Actor dropdown.
    I'm suggesting that you put the radio and its UI under the Dialogue Manager so they survive scene changes. This way you can use the radio in any scene.[/QUOTE]

    Thank you @TonyLi . This looks great... I love how flexible your asset is! :) Will try this and update here
     
    TonyLi likes this.
  39. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    @sacb0y - No worries; I'm glad it's working now!

    @SamRock - Glad to help!
     
  40. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Hi @TonyLi
    I am working on adding Quests to my game. Could you please share some guide or screenshots on how the QuestLog window can be customized? Are there any examples where the Quest Log UI has been fully modified but still works "out of box" as in, no code changes?

    How do each tasks appear in the QuestLog window? I wanted to show a Checkbox against each completed task. Also is there a way we can assign custom Quest numbers so that they can be sorted easily?
    Example: Main Question : M1, M2,
    Side Question: S1, S2

    Right now, I am using the title to group the quests, but its making it very messy
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @SamRock - Your quest log window may be instantiated by the Dialogue Manager's Instantiate Prefabs component. To customize it, add an instance of the prefab to the Dialogue Manager's Canvas, and remove it from the Instantiate Prefabs component's Prefabs list. This way you can see it in the scene view. You'll customize it like any other regular Unity UI window. You can change the textures, colors, and fonts, change the layout, etc. Just retain the assignments on the quest log window script. There may be some examples on the Extras page, and any game on the Games Showcase page that has quests will show a customized quest log window. But I think if you just add an instance of the prefab to the Canvas, you should be able to customize it how you like. Hover over the options in the Standard UI Quest Log Window component. The tooltips will explain what they do. The window has a lot of options that you can turn on and off; it's very flexible.

    They're sorted by group name. In each group, they're sorted by quest name, which is the quest's Display Name if set, otherwise its Name.

    Customize the Quest Entry Success Template:

    upload_2019-8-5_10-7-40.png

    For example, you can inset the text by a certain amount, and add a child image with a checkbox.
     
    SamRock likes this.
  42. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Thank you so much! Clearly lots and lots to explore! :) Will start with grouping my quests and look at some of the Showcase Games
     
    TonyLi likes this.
  43. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    @TonyLi So sorry to spam you regularly! Honestly feel bad :(

    But having a rather weird issue when I use the Quest Log Window. Everytime I toggle Quest window and click on any button, textbox and then close the Window, all my NPC starts gradually moving in the air. They have Physics enabled on them , and it only happening in this instance. Below is a video.. suggest you watch in 2X speed.
    Do you think any of the UI element is effecting the collision of the NPCs?

     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @SamRock - As a test, try unticking the quest log window's Pause While Open checkbox. Maybe something in your character scripts doesn't handle pausing.

    The quest log window is on the UI layer. Since it's a UI, it doesn't have any colliders. So I don't think it's a collider issue with the UI.
     
    SamRock likes this.
  45. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Can you confirm dialogue system's compatibility with 2019.2 standard pipeline?
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Yes. Works fine.
     
    SamRock likes this.
  47. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250
    Hi @TonyLi
    Thanks for the tip. I am using Timeline to control the NPC movement. I suspect it could be the reason. I need to dig in more.

    Meanwhile, I continue working on the Quests, i was also looking at various Quest Window designs. I came across this one which I really liked. Was wondering if I can make the default Quest Log Window show the quests in a sequence like this. Or any script file I need to alter to make it happen?

    ~~~~~~~~~~~~~~~~~~~~~~~
    Tabs: Primary Quest /Side Quest
    ~~~~~~~~~~~~~~~~~~~~~~~
    QUEST TITLE #1
    <Description>

    QUEST TITLE #2
    <Description>

    QUEST TITLE #3
    <Description>

    GUI.png
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @SamRock - Yes. You might be able to do it without any scripting if you put your quests into three groups (Primary, Secondary, and Tertiary). You'd have to set up the top tabs as Quest Group Templates.

    It might be simpler / more direct to make a subclass of StandardUIQuestLogWindow and override the ShowQuests method to show quests for the current category.

    But it's certainly possible to set up a UI like that without having to modify any of the Dialogue System, other than making your own UI and possibly a subclass script.
     
    SamRock likes this.
  49. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    315
    Hi Tony,

    Is there some way to perform different actions depending on which object tag enters a Dialogue System trigger? For example if an npc enters the trigger do this, whereas if the player enters the trigger, do this instead.
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Hi @Deckard_89 - Add two Dialogue System Triggers, both set to OnTriggerEnter. In the Condition section, set the Accepted Tags to 'Player' for one and to your NPC tag for the other.
     
    SamRock likes this.