I want to embed other UI in the text

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
mina_VRCh
Posts: 2
Joined: 05 Mar 2023 11:17

I want to embed other UI in the text

Post by mina_VRCh »

I want to modify the text display system to embed other UI in the text. Specifically, I'm trying to display buttons created by Unity's UI system along with the text.

Like this: Lorem ipsum dolor [Button 1] [Button 2] sit amet
(actually the buttons are a bit more complex)

I somehow expect that this can be achieved using a custom text printer and custom tags.
However, I am not quite sure how exactly.

Is it possible to make it work like this?

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: I want to embed other UI in the text

Post by idaot »

I suggest looking into TMPro sprites (https://docs.unity3d.com/Packages/com.u ... rites.html) which are compatible with TMPro printers (just be sure to add the TMProRevealableText material to the sprites to apply the revealable effect on them) as well as the text tag system (https://naninovel.com/guide/unlockable-items.html#tips) which you can modify (via the On Tip Clicked event) to serve another purpose. I tested using sprites to show tips and it worked fine.

mina_VRCh
Posts: 2
Joined: 05 Mar 2023 11:17

Re: I want to embed other UI in the text

Post by mina_VRCh »

Thank you very much!
It was a great help and allowed me to do what I wanted to do.

Can you do the same for the backlog?
I mean, I want the backlog to reflect the TextmeshPro tags and also be able to trigger On Tip Clicked events.

Any suggestions on how to do this would be great!

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: I want to embed other UI in the text

Post by idaot »

In the latest 1.19 pre-release it's possible to keep the TMPro styling as well as click on Tips items within BacklogUI. To receive access to 1.19, you need to join the official Discord server and register your license to receive access to the #download channel: https://naninovel.com/support/#naninovel-support

Post Reply