How to make an interactive text UI with current UI text system?

Hi guys, I am pretty new for unity and also c#. For now I am trying to learn Unity and Articy 3: draft. This is my idea here:

Using Articy to maintain my game content, the story, characters, items and all other game objects including their data structure. I can define and change and manage them, e.g. For the story, there are a series of linked dialog fragments. Each fragment is a game data object which was defined in articy, with speaker information, dialog content text etc in it.

Using Unity for the game logic and game construction.

For now, I can extract my story text from articy database and display them in my text ui. However, I want to have some interactive gameplay in my text UI part, something like:

  • If I click certain word in the text ui, the word will change its color and trigger something: print some new text information, or change some variables and print corresponding text.

I plan to add some markup or keyword in my dialog text and add some additional information to the dialog fragment since I can manage the data structure in articy easily. But at the unity part how can i parse the markup and execute those action (probably add a new section in dialog fragment’s data structure as C# code or something) when I click at those word?

After all, my idea may not be appropriate due to I am brand new here :stuck_out_tongue: so if you have any better idea please do tell me. Thank you soooo much guys!

Download TextMeshPro from the asset store (Free, bought by Unity). Google for the feature of changing colour ( I know that’s possible, and I think there’s an example for it in the TMP package). Other features may be available directly or something you could write up with code in addition. :slight_smile:

1 Like

Thank you! Looking into it now.