Forum rules - please read before posting.

Displaying Updated Content as Dynamic Text in a Popup Menu using Unity UI Prefab

I have been following the popups tutorial here > https://adventurecreator.org/tutorials/objectives-2-pop-ups

My question is about how to display dynamic text using a Unity UI Prefab instead of the default Adventure Creator menu source.

In the AC Game Editor panel, Menu tab, if I:
1. Create a new menu for my popup display.
2. Select the new menu on the list of menus to adjust its Properties.
3. Near the top of the Properties for the menu, change Source from Adventure Creator to Unity UI Prefab (implies that I must use an existing Unity UI prefab or create my own, which I do).
4. Near the bottom of the Properties for the menu, there is a field for Linked Text, and by default None (Text) appears in that field.

What kind of source is that field asking for?

I have tried:
* Creating a .txt file - Will not populate that field in the editor by drag / drop.
* Creating an .xml file - Same result
* Dragging the Text Mesh Pro element from the Unity hierarchy while in Prefab Edit Mode for the Unity UI Prefab previously created. - Same result.

There is no tool tip on hover for the Linked Text property, so I'm not sure what to link as text for each popup box.

What appears on play testing in the editor is whatever is in the Text Mesh Pro field for the Popup UI prefab. What is the recommended practice for making dynamic text appear in the popup box?

Thanks!

Comments

  • The field requires a Text component - the default component for displaying text with Unity UI.

    You can drag in a TextMesh Pro U GUI component if your UI prefab relies on it, but you'll first need to check Use TMPro components? in the Menu's properties panel to let AC know to expect it.

    If you'd like an extra set of eyes on things, share screenshots of your Menu/Label element's properties, as well as your UI prefab, and I'll take a look.

  • That did the trick. I didn't see the checkbox option before. Thank you, Chris!

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.