Text Printers

Text printers are novel actors used to present self-revealing text messages to the user.

Printers' behavior can be configured using Naninovel -> Configuration -> Printers context menu; for available options see configuration guide. The printers' resources manager can be accessed using Naninovel -> Resources -> Printers context menu.

In novel scripts, text printers are mostly controlled with @print and @printer actions:

; Will activate `Dialogue` printer
@printer Dialogue

; Will active `Fullscreen` printer
@printer Fullscreen

; Will print the infamous phrase using active printer
@print text:"Lorem ipsum dolor sit amet."

; The same as above, but using generic text statement
Lorem ipsum dolor sit amet.

; The same as above, but associated with character "Felix"
Felix: Lorem ipsum dolor sit amet.

Dialogue Printer

Dialogue printers present text inside windows with a flexible height. They initially take about a third of the screen size and will increase the height when the content requires more space. Dialogue printers also expose associated character name in a label above the text window.

Dialogue Printer

Fullscreen Printer

Fullscreen printers present text inside windows with a static size. They take most of the screen size and are indented for presenting large amounts of text.

Fullscreen Printer

Wide Printer

Wide printers are very like dialogue printers, except for some changes in the panel layout tailored for wide displays. Wide printers also support character avatars feature.

Wide Printer

Chat Printer

Chat printer presents text inside message bubbles framed in a window with vertically-scrollable content, resembling a mobile messager app. Instead of revealing the printed message character by character, it shows "author is typing" animation for the duration of the reveal effect and then instantly shows the printed message. Chat printer supports character avatars feature.

Chat Printer

Adding Custom Printers

You can customize the built-in text printers in any way you wish or create new printers from scratch. For example, let's customize the built-in dialogue printer.

All the built-in printer prefabs and related components are stored inside Naninovel/Prefabs/TextPrinters folder. While you can directly edit the Dialogue prefab and immediately get the result, consider duplicating it and adding as a separate printer to avoid issues when updating the Naninovel package in the feature.

Duplicate (Ctrl/Cmd+D) the Naninovel/Prefabs/TextPrinters/Dialogue.prefab prefab and move it outside of the Naninovel package, e.g. to a Assets/Printers folder.

Edit the prefab: change font, textures, add animations, etc.

Expose the prefab to engine resources using the printer's manager GUI, which can be accessed with Naninovel -> Resources -> Printers context menu. Add new record using the + (plus) button, enter the printer actor name (can differ from the prefab name) and double click the record to open actor settings. Drag-drop printer prefab to the Resource field.

Now you can use the new text printer by activating it via @printer action and specifying the printer actor name you've set in the manager.

Text Reveal Effect

By default, a gradient fade effect is applied when printing out the text messages. If, however, you prefer the more conventional "typewriter" style, you can disable the fade effect by disabling Slide Clip Rect and setting Reveal Fade Width and Reveal Fade Duration properties in Novel Text component to zero. Novel Text components are used in both default printers; eg, you can find it attached to Fullscreen/Content/Printer/Text gameobject of the Naninovel/Prefabs/TextPrinters/Fullscreen printer prefab.

Text Reveal Sounds

For the built-in printers, that support revealing effect (currently, Dialogue, Fullscreen and Wide) you can optionally set SFX to be played when the characters are revealed.

Follow the "Adding Custom Printers" guide above to create a custom printer based on any of the built-in ones, then find Revealable Text Printer Panel component attached to the root object of the prefab and use Reveal Sfx property to set the SFX to be played when a character is revealed. The actual list of the available options is based on the audio resources you've added via the Naninovel -> Resources -> Audio menu.

You can also use Chars SFX list property to map multiple SFXs to specific characters. The following illustration represents setup, where "Keystroke2" SFX will be played for spaces, "Explosion" for characters D, d, F, 1, 4, 9, and *, no SFX will be played for % character and "Keystroke1" will be played for all the other characters.

TextMesh Pro

Naninovel supports TextMesh Pro via a standalone extension package, that contains Fullscreen, Dialogue and Wide printers implemented with the TMPro UI text components.

First, download the latest version of the package using the link below: NaninovelTMPro.unitypackage.

Before importing the package, make sure you have TextMesh Pro installed in your Unity project. TextMesh Pro can be installed via package manager accessible via Window -> Package Manager menu.

Import the package and follow the above guide to add a new custom printer using one of the bundled TMPro printer prefabs (stored at NaninovelTMPro/Prefabs folder).

You can now select the added TMPro printers to route all the print actions to them using @printer action in novel scripts. In case you've named the printers the same as on the illustration above:

; Activate dialogue TMPro printer
@printer TMProDialogue
; Print text using the activated printer
Hello World!

When creating custom TextMesh Pro font assets, don't forget to apply Naninovel/NovelFontTMPro shader, otherwise the text reveal effect won't work.