Forum rules - please read before posting.

Custom Conversation Menu to display text

Hello. I bump into a basic question: I am making a custom conversation menu that display the the choices as text, similar to the AC origin Conversation Menu.

But after I have linked the buttons from the Conversation Menu Unity Prefab to the Linked Button fields, the text doesn't change according to the conversation choices. I have set the Link graphic to option to Button target graphic, and the Buttons in the Prefab have the Text object dragged into the Target Graphic field.

Comments

  • What's your AC version?

    All sounds fine from your description. Are the Text components children of the Buttons?

    The default Conversation menu has a Unity UI variant. If you've used the New Game Wizard to create it, you can switch it's Source to try it out. Comparing AC's ConversationUI prefab with your own may reveal the key difference.

  • I am using AC1.68.3.

    Yes the Text components are children of the Buttons.

    How may I use the default Conversation menu Unity UI variant? I haven't use the New Game Wizard to create the game. Can I do it to the existing game?

  • You can use the NGW with a temporary game name to create a set of Managers (with the default Unity UI interface), and then copy over the Inventory menu from there into your own Menu Manager asset file.

  • I run into a strange situation:
    Using the Unity UI Conversation Menu in a new clean game works. But when I import it into my existing game, the text doesn't change to the conversation choices (stay as Dialog Option 1). I checked all the menu settings are identical between the clean game and existing game. Any idea what other possible settings would cause this?

  • I even tried it on a clean scene, and import the clean game managers & menus into the existing game clean scene, and made a new player for the scene. But the problem still persist...

  • What's more weird, if I import the whole existing game to the new clean game (with AC folder imported before from Asset Store), the conversation UI works correctly.

  • edited August 2019

    I even tried it on a clean scene, and import the clean game managers & menus into the existing game clean scene, and made a new player for the scene.

    To be clear: things work in a fresh project, but not in your existing project - even if your existing project has all the newly-made Managers assigned?

    You may need to re-connect the dialogue option buttons to AC's Menu Manager. Place the prefab into the scene, and select the DialogList element in the Menu Manager. One-by-one, drag and drop each of the prefab's dialogue option buttons into each element slot's "Linked button" field in the Menu Manager. (The default ConversationUI prefab names these buttons "btnOption1-4" as children of the "Grid" GameObject.

    Then apply changes to the prefab, and remove from the scene. Things any better? What's your Unity version?

  • Sorry for the super late follow up. I didn't have time to fix this til now. The issue is actually due to I have used the TextMeshProIsPresent in scripting symbol, so I have to use TMP for the text as well.

  • I'm having the same issue, since I use the SpeechBubble UI Template and use the TextMeshProIsPresent scripting symbol the Dialogue Options can be perfectly linked to the right place, but once i exit the prefab or start the game they always display as "missing (Button)" in the AC Game Editor -> Menu -> DialogueList properties. I tried to solve it by replacing the text in the UI Canvas with TextMeshPro, but when I try to replace the text with TextMeshPro texts for some reason everything just disappears altogether. Is there a way to just have SpeechBubble without the "TextMeshProIsPresent" scripting symbol?

  • The SpeechBubble package requires TextMeshPro to work correctly, because it relies on TMPro's GetPreferredValues function to calculate how large the bubble should be.

    If AC detects the TextMeshProIsPresent symbol, AC will rely on TMPro for Text components in Unity UI-based Menus. If you use it, you'd need to update your existing UI prefabs by replacing their Text components with TextMeshPro UGUI.

    I appreciate this can be a hassle, though in general I'd recommend using TMPro for UI text rendering even without SpeechBubble.

  • Ahhh I see, yes it's working now! I did the mistake to add 3D TMPro object instead of creating the UI-Text TextmeshPro objects... now it's all back to normal AND I have the beautiful speech bubbles! So happy :-)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.