I want to embed other UI in the text

Posted: 05 Mar 2023 11:37
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?


Re: I want to embed other UI in the text

Posted: 06 Mar 2023 13:36
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.


Re: I want to embed other UI in the text

Posted: 14 May 2023 09:00
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!


Re: I want to embed other UI in the text

Posted: 15 May 2023 11:03
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