Displaying text on a screen?

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
justloveme94
Posts: 25
Joined: 18 Feb 2021 14:26

Displaying text on a screen?

Post by justloveme94 »

I apologize if this is not even on the right board. I am still trying to familiarize myself with both Unity and Naninovel. After the player starts the game, I wanted to create a screen where the player can input their name but I also wanted to display text on the screen. How do I with Naninovel display the text on the screen along with the input field? Also, is there anyway to customize the input field? I was trying to set up the input screen like a vintage computer.

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

Re: Displaying text on a screen?

Post by idaot »

Welcome! You can create your own copy of the Input prefab by right clicking on a Project folder and choosing Naninovel -> Default UI -> VariableInputUI. To display it instead of the built-in one, simply replace the VariableInputUI in the UI Resources with your copy. That way you can modify as you please, alongside displaying your desired text (If the text is going to change depending on the question, then consider adding a Custom Variable Trigger which lets you set the text via custom variables, more information here: https://naninovel.com/guide/custom-variables.html)

This is the prefab you need to replace in the UI Resources:
Image

justloveme94
Posts: 25
Joined: 18 Feb 2021 14:26

Re: Displaying text on a screen?

Post by justloveme94 »

Ah, thank you for explaining the input field but how do I display text on the screen without the text appearing in the dialogue box?

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

Re: Displaying text on a screen?

Post by idaot »

You can create your own Custom UI with the text and just like with the Variable Input UI, you can change the text by setting a string variable. I suggest checking out this guide and the video example as it demonstrates both topics: https://naninovel.com/guide/user-interf ... omization

Additionally, I suggest looking into the Unity UI documentation if you haven't already, it's well laid out and will help you get the desired layout: https://docs.unity3d.com/Packages/com.u ... index.html

justloveme94
Posts: 25
Joined: 18 Feb 2021 14:26

Re: Displaying text on a screen?

Post by justloveme94 »

Ah thank you so much! This was exactly what I was trying to do. Now I can start messing around with the text input.

Post Reply