Characters are novel actors used to represent scene entities that are placed on top of the backgrounds.

A character actor is defined with a name, appearance, visibility, transform (position, rotation, scale) and look direction. It can change appearance, visibility, transform and look direction over time.

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

Add Character

In novel scripts, characters are mostly controlled with @char action:

; Shows character with name `Sora` with a default appearance.
@char Sora

; Same as above, but sets appearance to `Happy`.
@char Sora.Happy

; Same as above, but also positions the character 45% away from the left border
; of the screen and 10% away from the bottom border; also makes him look to the left.
@char Sora.Happy look:left pos:0.45,0.1

Display Names

In the character configuration you can set a Display Name for specific characters. When set, display name will be shown in the printer name label UI, instead of the character's ID. This allows using compound character names, that contains spaces and special characters (which is not allowed for IDs).

For localization, use "CharacterNames" managed text document, which is automatically created when running generate managed text resources task. Values from the "CharacterNames" document won't override values set in the character metadata when under the default locale.

Message Colors

When Use Character Color is enabled in the character configuration, printer text messages and name labels will be tinted in the specified colors when the corresponding character ID is specified in a @print action or generic text line.

The following video demonstrates how to use display names and character colors.

Avatar Textures

You can assign avatar textures to characters using avatar parameter of @char action. Avatars will be shown by the compatible text printers when they print a text message that is associated with the character. Currently, only Wide and Chat text printers support the avatars feature.

To use any given avatar, you have to first add it to the avatar resources and give it a name. You can do this via Avatar Resources property in the characters configuration menu.

You can set a default avatar for a character by giving the avatar texture resource name that equals to CharacterID/Default; eg, to set a default avatar for character with ID Kohaku name the avatar resource Kohaku/Default. Default avatars will be used when avatar parameter is not set in the @char actions.

It's also possible to associate avatars with specific character appearances, so that when character changes appearance, the avatar will also change automatically. For this, name the avatar resources using the following format: CharacterID/CharacterAppearance, where CharacterAppearance is the name of the appearance for which to map the avatar resource.

Speaker Highlight

When enabled in the character configuration, will tint the character based on whether the last printed message is associated with it.

Sprite Characters

Sprite implementation of the character actors is the most common and simple one; it uses a set of sprite assets to represent appearances of the character. The source of the sprites could be .png or .jpg image files.

Sprite character appearance assets can be either managed by editor GUI or placed in a Resources/Characters/CharacterName folder, CharacterName being the name of the character, for an automatic exposure.

Diced Sprite Characters

Implemented via an open source (MIT license) third-party package SpriteDicing used to optimize build size and texture memory by reusing source sprite textures of the characters.

Sprite Dicing

In order to be able to choose this implementation you have to install NaninovelSpriteDicing extension package. The extension package contains character implementation scripts and has SpriteDicing bundled inside "ThirdParty" folder.

DicedSpriteAtlas assets containing character appearances are used as the resources for the diced sprite characters. Each appearance is mapped by name to the diced sprites contained in the atlas.

Note, that diced characters implementation currently doesn't support animated appearance changes (they're changed instantly).

The following video guide covers creating and configuring diced sprite atlas, adding new diced character based on the created atlas and controlling the character from a novel script.

Animated Characters

Animated characters is the most flexible characters actor implementation. It's based on a prefab with an animator component attached to the root object. Appearance changes are routed to the animator component as SetTrigger commands appearance being the trigger name. You're free to implement the behavior of the underlying object. For example, you can use a 3D rigged character model and route the appearance changes to the corresponding rig animations.

Animated characters can only be managed by editor GUI.

Live2D Characters

Live2D character implementation uses assets created with Live2D Cubism 2D modeling and animation software.

In order to be able to use this implementation you have to first install Live2D Cubism SDK for Unity. Consult official Live2D docs for the installation and usage instructions.

Then install NaninovelLive2D extension package.

Live2D model prefab used as the resource for the implementation should have a Naninovel.Live2DController component attached to the root object. Appearance changes are routed to the animator component as SetTrigger commands appearance being the trigger name. Eg, if you have a "Kaori" Live2D character prefab and want to invoke a trigger with name "Surprise", use the following action:

@char Kaori.Surprise

Note, that the above action will only attempt to invoke a SetTrigger with "Surprise" argument on the animator controller attached to the prefab; you have to compose underlying animator state machine yourself.

Look direction can optionally be controlled via Live2D's CubismLookController (can be disabled via Control Look field of the Naninovel.Live2DController component).

Be aware, that Naninovel.Live2DController expects a "Drawables" gameobject inside the Live2D model prefab (created automatically when importing Live2D models to Unity); the controller will scale this gameobject at runtime in correspondence with "scale" parameter of the @char actions. Hence, any local scale values set in the editor will be ignored. To set an initial scale for the Live2D prefabs, please use scale of the parent gameobject as shown in the video guide.

When Live2D extension is installed a "Live2D" item will appear in the Naninovel configuration menu providing following options:

Render layer specifies the layer to apply for the Live2D prefabs and culling mask to use for the cameras that will render the prefabs. Render camera field allows to use a custom setup for the render camera (the default render camera is stored inside the packages "Prefabs" folder). Camera offset allows to offset the render camera from the rendered prefab; you can use this parameters to uniformly position all the Live2D prefabs relative to the camera.

The following video guide covers exporting a Live2D character from Cubism Editor, configuring the prefab, creating a simple animator state machine and controlling the character from a novel script.