Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    10,732
    @goutham12 - You must unassign the Subtitle Text field first, as indicated in the manual. This will reveal assignable 2 fields: one for UI Text, another for TextMesh Pro.
     
  2. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    425
    Hello,

    I'd like to know how can I copy a whole conversation from another database and have it in my real one. Both databases have different conversations, so Im not sure if merging will work since I just need only one of them.
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @skinwalker - Lasso the conversation's nodes (except <START>), right-click, and select Copy:

    upload_2020-5-18_8-9-25.png

    Then create a new conversation in the other database, right-click, and select Paste.
     
    skinwalker likes this.
  4. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,009
    Hi @TonyLi : How do I add an item to a quest when picking it up with RFPS and S-Inventory. I get how to add it to the inventory but not how to add it to the quest log. Also: When I end a conversation, I want to trigger an Emerald AI Summon scriptable object. What would be the best to do this?

    Also: Can I do something like this to display the amount remaining in a quest?

    There's [lua(10-GetItemAmount("Player", "Gromhold Ignot"))] left. Hurry lets find them.
     
    Last edited: May 18, 2020
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    You can do it like the [lua] code you added below.

    You can add a Dialogue System Trigger to one of the participants and set it to OnConversationEnd. Select Add Action > OnExecute() UnityEvent, and configure the UnityEvent to trigger your summon object.

    Yes. :)
     
  6. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    Hey Tony,

    I was having some issues in regards to the little menu that's supplied with the asset.
    When I press escape in my own project (not a clean project, I'll admit) the menu pops up but I can't actually click anything in the menu. Once I try to click something the cursor just goes away and nothing happens until I press escape again to make the menu go away.

    The biggest offender I could see would be opsive first person controller, but I do have the integration package.
    In regards to the settings I might have missed something, but I don't think so as I tried to copy most of what was in the sample. Do you happen to have a hunch of what it could possibly be?
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    @SOSolacex - Are you talking about this menu?

    upload_2020-5-19_19-36-58.png

    The skin may be different if you haven't assigned the Wheel2 Dialogue GUI Skin like in the integration's example scene.

    In the last update of the example scene, the OnOpen() and OnClose() events got disconnected. I'll be sending an updated package to Opsive with the release of DS 2.2.7. In the meantime, add a UCCMenuUtility component, and hook it up to the DemoMenu component as shown below:

    upload_2020-5-19_19-36-18.png
     
  8. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    Thanks for the reply. Whilst it did help, I am having an issue now where it DOES work in playmode in the editor, however I am having the same results as before after building & running the game.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi! I confirmed that it works in a build. Make sure you're building the same scene that you tested in the editor's playmode, and that the DemoMenu's OnOpen() and OnClose() events are still configured like in my previous reply. You can also try building the example scene (after making sure OnOpen() and OnClose() are set) to verify that it works correctly. Once you've done that, you can compare it to your own scene.
     
  10. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    Can confirm the example doesn't work for me either.
    The cursor simply doesn't show up in the first place after pressing escape.

    However, much like the issue in my own project, it DOES work during editor playmode. Only after build is when it doesn't work.
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    I tested in a new, empty project with just UCC, DS, and the integration. Then I assigned the OnOpen() and OnClose() events, made a Windows build, and tested it. Does it work for you in a new project? Maybe something else is interfering.

    I'm attaching the latest integration package to this post if you want to try it. Future readers: Please use the integration package from Opsive's site, as this one will likely be outdated soon.
     

    Attached Files:

  12. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    That integration package worked perfectly even in my current project.
    Thank you.
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Happy to help! You may have just had an older integration package. Glad it's working now.
     
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Out Of Shapes Available On Steam

    Just released on Steam, check out the dialogue-oriented game Out of Shapes, called "The Stanley Parable with more RPG elements."

     
  15. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    Is it possible to easily set up a sound anytime the little "new mission" pop up through dialogue manager? Same for when a mission is complete.
     
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    There are a few ways to do it. The simplest may be to add a Dialogue System Events component or script with OnQuestStateChange method to the Dialogue Manager. Example:
    Code (csharp):
    1. void OnQuestStateChange(string quest)
    2. {
    3.     if (QuestLog.IsQuestActive(quest)) audioSource.PlayOneShot(newMissionSound);
    4.     else if (QuestLog.IsQuestSuccessful(Quest)) audioSource.PlayOneShot(missionCompleteSound);
    5. }
     
  17. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    Ohh I completely forgot about that, apologies.
    By the way, another question which is also going to be fairly stupid, but I can't find it even after reading some related stuff in the documentation..

    But the question is: (I use Opsive first person controller) After interacting with an object (Pressing F when looking at it), how do I destroy it?

    For example, I set up a book with an interactable component and a dialogue system trigger component and I have it correctly setup to disable the component, however I want it destroyed.

    So in the actions I have "Set gameobjects to active/inactive" with the book transform linked to it, however I am not sure how to actually destroy the book. Following some older documentation of UFPS, there shouldn't be a tickable box that can switch between deactivate and destroy, however I see no such thing.
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @SOSolacex - You might be thinking of the Increment On Destroy and Destructible Saver components, which have an OnDisable/OnDestroy dropdown. But there aren't any built-in components to destroy a GameObject. You can add a script like this:

    DestroyOnConversationEnd.cs
    Code (csharp):
    1. using UnityEngine;
    2. public class DestroyOnConversationEnd : MonoBehaviour
    3. {
    4.     void OnConversationEnd(Transform actor)
    5.     {
    6.         Destroy(gameObject);
    7.     }
    8. }
     
  19. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28
    I appreciate your quick answers, I really do.
    In regards to the DestroyOnConversationEnd, I basically want to have the GameObject destroyed as soon as I interact with it and apply the Increment On Destroy that way.

    DestroyOnConversationEnd means I have to start a conversation first, which is not desired.

    In regards to the Dialogue System Events component, I've got "On quest state change" -> My audiosource -> AudioSource.PlayOneShot with my audioclip attached and in the conversation script, I've got
    Variable["TalkedToMom"] = true;
    Variable["Alert"]= "Mission: Talk to Fargus";
    SetQuestState("Talk to Fargus", "active");

    However, the audioclip doesn't play upon the state change unfortunately.
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    If you're interacting using Selector or ProximitySelector, you could add a script like this instead:

    DestroyOnUse.cs
    Code (csharp):
    1. using UnityEngine;
    2. public class DestroyOnUse : MonoBehaviour
    3. {
    4.     void OnUse(Transform actor)
    5.     {
    6.         Destroy(gameObject);
    7.     }
    8. }
    I don't follow.Try adding this script to the Dialogue Manager:

    QuestAudioAlerts.cs
    Code (csharp):
    1. using UnityEngine;
    2. using PixelCrushers.DialogueSystem;
    3. public class QuestAudioAlerts : MonoBehaviour
    4. {
    5.     public AudioSource audioSource; //<--ASSIGN AN AUDIO SOURCE IN INSPECTOR
    6.     public AudioClip newMissionSound; //<--ASSIGN IN INSPECTOR
    7.     public AudioClip missionCompleteSound; //<--ASSIGN IN INSPECTOR
    8.  
    9.     void OnQuestStateChange(string quest)
    10.     {
    11.         if (QuestLog.IsQuestActive(quest)) audioSource.PlayOneShot(newMissionSound);
    12.         else if (QuestLog.IsQuestSuccessful(quest)) audioSource.PlayOneShot(missionCompleteSound);
    13.     }
    14. }
     
    Last edited: May 22, 2020
  21. SOSolacex

    SOSolacex

    Joined:
    Jan 10, 2018
    Posts:
    28

    The code gives me multiple errors even though I copy pasted it. http://prntscr.com/sm0osi
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    @SOSolacex - It had a couple of typos. I just updated the code in my post above.
     
  23. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    161
    Thanks for the reply.
    I got one question tho, I want to change the conversation vased on a INT at the start of the scene.
    I was thinking of making a script with a Switch based on the number of the event and then change the conversation.

    Is there a built-in function to this already in the asset?
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @MrZeker - One way to do this is to always start the same conversation. It can be a "hub" conversation that links to other conversations if you want. In the conversation, check the value of a Dialogue System variable and follow the corresponding branch. For example, the conversation below checks the value of a variable named "ConvNumber". If ConvNumber is 0, it shows the first branch. If ConvNumber is 1, it shows the second branch. If ConvNumber is 2, it shows the third branch. The first branch's Conditions check if ConvNumber is 0. If so, it uses this branch, and the Script increments ConvNumber:

    upload_2020-5-23_8-16-25.png

    You can also set ConvNumber from C# or a visual script action. Example:

    Code (csharp):
    1. DialogueLua.SetVariable("ConvNumber", 1);
    You don't have to use a Number variable. You can use a Text variable (i.e., string) if it makes things clearer.
     
    MrZeker likes this.
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Dwerve Giveaway

    Dwerve, the tower defense RPG being made with the Dialogue System for Unity, is having a giveaway that ends May 31. You could win alpha access or a Dwerve t-shirt.

    Join the giveaway here:

    https://dwerve.com/giveaway

    upload_2020-5-23_10-15-48.png
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
  27. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    161
    Oh nice, but, where should i add the variable? or how do i tell the dialogue system to read the variable from my script?
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Add it in the Dialogue Editor's Variables section:

    upload_2020-5-25_8-35-31.png

    Alternatively, you can simply set it in your C# script using DialogueLua.SetVariable:

    Code (csharp):
    1. using PixelCrushers.DialogueSystem; // (add to top of script)
    2. ...
    3. DialogueLua.SetVariable("ConvNumber", 3);
    If the variable doesn't exist yet, DialogueLua.SetVariable will create it.

    To read that variable value in your C# script, use DialogueLua.GetVariable:

    Code (csharp):
    1. int convNum = DialogueLua.GetVariable("ConvNumber").asInt;
     
  29. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Black Book AMA on Reddit 10 AM EDT

    The devs of Black Book, a Slavic myth-inspired RPG made with the Dialogue System for Unity, are holding an AMA on reddit today at 10 EDT:

    We'll be holding an AMA on https://reddit.com/r/pcgaming/ starting from 10 AM ET today (May 29). Prepare your questions and join us there – we'll be happy to answer anything! If you're not from the US, you can check the time difference here: https://time.is/en/ET

    You can also back the game on Kickstarter.

     
    Deckard_89 likes this.
  30. JACKO4590

    JACKO4590

    Joined:
    Nov 25, 2014
    Posts:
    81
    Hey mate. I've been working on the save side of things but coming to saving player health and ammo ect. What's the best way to do this?

    Thanks
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @JACKO4590 - Use a saver component. If you're using a player controller that has an integration package, such as for Opsive controllers, Invector, RFPSP, Emerald AI, etc., then you can add the corresponding player saver component(s). Otherwise you can write one. Make a copy of SaverTemplate.cs, which you can find in Plugins / Pixel Crushers / Common / Templates. Then rename it and fill in the code where indicated. Take a look at any of the existing savers, such as PositionSaver, for examples.
     
  32. Nicopol

    Nicopol

    Joined:
    May 30, 2020
    Posts:
    1
    hi @TonyLi , I'm helping a friend with her game. Basically it's simple a narrative story with multiple choices. actually she asked me if it's possible to jump to a specific entry, in order to debug her scenes,
    but I'm a bit lost, I saw a GotoState command but I'd like a gotoEntry, is it possible? am I doing some logical mistake here? thanks for your help.
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @Nicopol - If a conversation isn't active yet, you can start it at a specific entry. Two options:
    • If you're using a Dialogue System Trigger, in Actions > Start Conversation tick Specify Starting Entry.
    • In code, use DialogueManager.StartConversation("title", actor, conversant, entryID).
    If the conversation is active, you can still jump to a specific entry. Two options:
    • At design time (i.e., before playing), use the Dialogue Editor window to add a link to the specific entry. However, this requires you to edit the dialogue database. You may want to use the second option if you don't want to change the database.
    • Use GotoState. When a conversation is active, the current dialogue entry is represented by a ConversationState. This contains the entry and its runtime values, such as the dialogue text with all markup tags processed, the links that are currently valid based on the current variable values, etc. Conversations use a Model-View-Controller architecture. The Model manages ConversationStates. The Controller sits between the Model and View. You'll want to tell the Model to get a specific entry's state, and then tell the Controller to go to that state:
      Code (csharp):
      1. ConversationState state = DialogueManager.conversationModel.GetState(dialogueEntry);
      2. DialogueManager.conversationController.GotoState(state);
     
  34. lcizzle

    lcizzle

    Joined:
    Jun 13, 2016
    Posts:
    8
    Hello,

    I'm having a slight issue with Ink integration, possible a bug.

    This works.
    - One does not simply walk into Mordor. # Actor=Boromir # Conversant=Elrond

    This does not work. It seems something doesn't like my 2 character actor name but that is indeed the name of my actor.
    - One does not simply walk into Mordor. # Actor=IO # Conversant=Elrond

    Any ideas?
     
  35. lcizzle

    lcizzle

    Joined:
    Jun 13, 2016
    Posts:
    8
    Looks like I fixed it. IO was at the first ID in the actor database. I changed that ID to Story and moved IO to another actor slot and everything now works!
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Great! BTW, the Dialogue System Extras page has an updated Ink integration package. The Ink integration got a lot of attention in preparation for version 2.2.7.
     
  37. JACKO4590

    JACKO4590

    Joined:
    Nov 25, 2014
    Posts:
    81
    I'm using a custom top down controller so yes I had to make a new script based off the template. Thank you for that as I was getting stuck. Spent a couple of hours this morning and its now saving and loading the health.

    I do have another problem. When loading the game saves it has about 20% chance to ignore the save and load from the beginning position and health ect. Noticed it yesterday. Not sure how to debug that. If I hit load a couple of times it tends to then work and load the correct position ect.
    Thanks
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Tick the Debug checkboxes on the Save System component and the saved game data storer component. This will give you an idea of what's happening behind the scenes.

    The Save System component has a Frames To Wait Before Apply Data value. It defaults to 1, which means the Save System will load the saved game scene, then wait 1 frame to allow scripts to initialize, and finally apply the saved game data. This allows components that initialize in Start methods to finish initializing first. If your custom controller is initialized in Awake, then you can set Frames To Wait Before Apply Data to zero. However, if your controller takes multiple frames to fully initialize before the saver component can start changing its values, you may need increase Frames To Wait Before Apply Data.
     
  39. JACKO4590

    JACKO4590

    Joined:
    Nov 25, 2014
    Posts:
    81
    Ok I had Frames To Wait Before Apply Data set to 4. Putting this to 1 i have not been able to recreate the issue.

    I'm coming back to this project after 8 months of no work, so I have no idea why it was on 4 but I'm rewriting half of the scrips, so I might have had something there for it.

    Thank you for your support and I'll most likely be back.
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Glad you got it working! :)
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Space Cats Tactics Kickstarter Now Live!

    Mitzi Games' Space Cats Tactics is now live on Kickstarter!

    (Reminder - Morteshka's Black Book, which has already blasted past several stretch goals, is in its last 4 days of its Kickstarter campaign, too.)

     
  42. lcizzle

    lcizzle

    Joined:
    Jun 13, 2016
    Posts:
    8
    Great thanks for the heads up! When is 2.2.7 due?
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Version 2.2.7 should hopefully be available to download on the Asset Store by this Friday. But you can download the updated Ink integration now from the Extras page if you want to get it before then.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Dialogue System 2.2.7 Released

    Version 2.2.7 of the Dialogue System for Unity is now available on the Asset Store!

    This is a huge update. Some of the highlights are:
    • Scene events. Dialogue entry nodes now support UnityEvents that you can hook up to scene objects.
    • Addressables support. No need to do anything special. Just tick the "Addressables" checkbox in the Dialogue System's Welcome window. Sequencer commands such as AudioWait() will automatically use addressables if they exist.
    • Ink support. Major improvements to the Ink integration. This update also includes updated Twine import.
    • Sequence, Conditions, & Script icons. Dialogue entry nodes now show icons so you can quickly see which ones have Sequences, Conditions, or Scripts:
      upload_2020-6-4_9-1-16.png
      If you hover the mouse over an icon, a tooltip shows you the content; no need to inspect the node in the Inspector view to see it.

    Release Notes:


    Core:
    • Changed: Localization Export/Import now exports Actor column to identify each line's speaker.
    • Added: Dialogue entry nodes now have optional UnityEvents that can operate on scene objects.
    • Added: Addressables support.
    • Improved: Custom Lua Function Info can now use forward slashes to make submenus.
    • Improved: Quest tracker script methods are now overridable.
    • Improved: Added DeselectPreviousOnPointerEnter component.
    • Improved: Added InputDeviceManager.isInput Allowed.
    • Improved: AudioWait() sequencer command will now use Audio Source on child object if present.
    • Fixed: TextMeshProTypewriterEffect Auto Scroll Settings updated.
    • Fixed: When subtitle panels were configured to accumulate text, typewriter effect accounted for <color=#rrggbbaa> tags but not <color=name> tags.
    • Fixed: Subtitle panel could not auto-focus continue button in certain configurations.
    • Fixed: If OverrideDialogueUI pointed to a prefab and conversation started at non-START entry, timing issue would hide UI instead of showing it.
    • Fixed: Stopping conversation prematurely would not hide Dialogue Actors' external menu panels.
    • Fixed: DialogueSystemTrigger Pause / Show Cursor During Conversations now works even if trigger is not on actor or conversant.
    • Fixed: DialogueSystemTrigger Start Conversation action now provides correct conversation conversant when checking if conversation has valid entry.
    • Fixed: If using SimStatus with multiple simultaneous conversations, Dialog[] table now always points to the correct conversation.
    • Fixed: If Usable is disabled while Selector is selecting it, now hides selection UI.
    • Fixed: New Input System integration ignores joystick keycodes.
    • Fixed: New Input System could report ArgumentNullException in first frame on WebGL.
    • Text Tables: Added ability to import text table into another.
    • Save System: Changed: Savers' Save Across Scene Changes checkbox is now ticked by default.
    • Save System: DestructibleSaver.RecordDestruction is now public.
    • Save System: Added saveDataApplied C# event; added OnDataApplied() event to SaveSystemEvents.
    • Save System: Improved singleton management.
    • Save System: Fixed: LoadEnded event is always called when scene loads ends, not just if events were assigned at design time.
    • Cinemachine: Updated CinemachinePriority() sequencer command 'cut' option to work with latest Cinemachine.
    • Timeline: Updated Timeline() sequencer command GameObject binding for index values used by latest Timeline.
    • Dialogue Editor:
      • Nodes now show icons when they have a Sequence, Conditions, or Script instead of appending info to text label.
      • When dragging multiple nodes with grid snapping on, selected nodes not under mouse cursor are now also snapped to grid when drag ends.
      • Misc. improvements to dialogue entry inspector.
      • Watches > Add Runtime Variable & Add All Runtime Variables now automatically refresh the variable list first.
    Third Party Support:
    • Adventure Creator:
      • Updated for AC 1.71.
      • AC Lua functions are now in '...' Custom dropdowns.
      • Can load action list assets from Addressables.
    • Articy: Fixed: Some HTML codes were not being converted to characters.
    • Behavior Designer: Lua functions now in dropdowns. Added Lua functions to target specific behavior tree group IDs.
    • Corgi: Updated for 6.4; Added ConversationZone.DisallowMovement/UndoDisallowMovement methods; DialogueSystemCorgiEventListener manages handoff between dialogue UI and Corgi pause menu.
    • i2 Localization: Automatically translates \n into newlines when importing back into DS.
    • Ink:
      • Added option to read actor names from lines.
      • Added option to trim or leave whitespace.
      • Knot/stitch picker dropdown now includes included files.
      • Uses real player actor, not PlayerSpeaker, for subtitles.
      • Added DialogueSystemInkIntegration.lastStartingPoint.
      • Added GetActorsInStory().
      • Fixed transform assignments to Sequence() functions.
    • Invector: Updated for 2.5.2.
    • Look Animator: Added 'none' option to LookAnimator() sequencer command.
    • Rog: Updated for 1.55.
    • TopDown Engine: Updated Disable TDE Input During Conversations to better handle certain setups.
    • Twine: Fixed: Links with the same name but in different nodes are now handled as separate links.
    • UCC: Updated for 2.2.2.
    • uMMORPG: Updated for 1.190.
     
    Candy-Bomber and hopeful like this.
  45. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    425
    Hello,

    Im using the unity recorder and 4k recording resolution (2160p), I want to capture some dialogues but the canvas appears very tiny. Do you know how can I maintain the size while recording?
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @skinwalker - Add a Canvas Scaler to the canvas, and set it to Scale With Screen Size.

    By default, Unity UI canvases are scaled to pixel size. If you make a panel that's 400 pixels wide, it will be 400 pixels wide regardless of whether the screen is 800 pixels wide or 4096 pixels wide.

    If you change the Canvas Scaler to Scale With Screen Size and set the reference resolution to, say, 800x600, then the same UI panel will always occupy half the screen width regardless of whether the screen is 800 pixels or 4096 pixels. You can adjust the Screen Match Mode to find the best fit for your UI for different aspect ratios.
     
    skinwalker likes this.
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Clunky Hero on Kickstarter

    Clunky Hero, made with the Dialogue System for Unity, is entering the last week of its Kickstarter campaign. If you like humorous, story-driven RPGs, you can back it on Kickstarter.

     
  48. Candy-Bomber

    Candy-Bomber

    Joined:
    May 21, 2015
    Posts:
    65
    Thank you very much for the continued updates. I am very excited about UnityEvent support especially!
     
    TonyLi likes this.
  49. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    425
    Hello,

    I have setup the dialogue system to work really well in terms of how long it takes to display player buttons after each dialogue line, but now I tried stacking 3-4 NPC nodes one after another and the transition is really fast. I was wondering if there is an easy way to add a "Next" button after each line, or maybe a way to wait for 4-5 seconds after the sentence is fully visible (well maybe even more depending on the length).

    I also have voice acting coming soon, so Im not sure how this will play out.

    Im using these commands on the DialogueManager prefab

    AudioWait(entrytaglocal);
    Delay({{end}})
     
    Last edited: Jun 10, 2020
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,732
    Hi @skinwalker - For the "Next" button, inspect the Dialogue Manager GameObject. Set the Subtitle Settings > Continue Button dropdown to Always or Optional/Not Before Response Menu.

    Alternatively, to wait n seconds after the typewriter has finished, where n is based on the text length, use this sequencer command:

    Delay({{end}})@Message(Typed)

    That'll be fine. Note that in version 2.2.7+, you can import Unity's Addressables package and tick the Addressable checkbox on your voice acting audio files. This way they don't have to be in Resources or an assetbundle. The tradeoff is that Unity loads Addressables asynchronously, so there may be a very tiny delay before it actually starts playing. If it's an Addressable, the Dialogue System will also unload it immediately after playing, which reduces memory consumption. This is just a neat new option, so I thought I'd mention it. But using Addressables certainly isn't required.
     
    skinwalker likes this.
unityunity