Skip to content

Configuration

The engine configuration is stored in multiple scriptable object assets located at Assets/NaninovelData/Resources/Naninovel/Configuration folder. They are automatically generated when opening the corresponding configuration menus in the Unity editor for the first time.

Use Naninovel -> Configuration or Edit -> Project Settings -> Naninovel to access the configuration menu.

Notice, that all the configuration menus are supporting Unity's presets feature ↗. It could be useful to create several configuration presets when deploying to different target platforms (eg, mobile, standalone, consoles, etc).

cover

It's possible to modify configuration objects at runtime, add new custom configurations and change the way the objects are accessed at runtime (eg, read configuration from JSON files stored on a remote host); see custom configuration guide for more information.

Audio

PropertyDefault ValueDescription
Audio LoaderAudio- (Addressable, Project)Configuration of the resource loader used with audio (BGM and SFX) resources.
Voice LoaderVoice- (Addressable, Project)Configuration of the resource loader used with voice resources.
Audio PlayerNaninovel Audio PlayerIAudioPlayer implementation responsible for playing audio clips.
Default Master Volume1Master volume to set when the game is first started.
Default Bgm Volume1BGM volume to set when the game is first started.
Default Sfx Volume1SFX volume to set when the game is first started.
Default Voice Volume1Voice volume to set when the game is first started.
Enable Auto VoicingFalseWhen enabled, each @print command will attempt to play an associated voice clip.
Voice Overlap PolicyPrevent OverlapDictates how to handle concurrent voices playback:
• Allow Overlap — Concurrent voices will be played without limitation.
• Prevent Overlap — Prevent concurrent voices playback by stopping any played voice clip before playing a new one.
• Prevent Character Overlap — Prevent concurrent voices playback per character; voices of different characters (auto voicing) and any number of @voice command are allowed to be played concurrently.
Voice LocalesNullAssign localization tags to allow selecting voice language in the game settings independently of the main localization.
Default Fade Duration0.35Default duration of the volume fade in/out when starting or stopping playing audio.
Play Sfx While SkippingTrueWhether to play non-looped sound effects (SFX) while in skip mode. When disabled, will ignore @sfx commands without loop! while skipping.
Custom Audio MixerNullAudio mixer to control audio groups. When not specified, will use a default one.
Master Group PathMasterPath of the mixer's group to control master volume.
Master Volume Handle NameMaster VolumeName of the mixer's handle (exposed parameter) to control master volume.
Bgm Group PathMaster/BGMPath of the mixer's group to control volume of background music.
Bgm Volume Handle NameBGM VolumeName of the mixer's handle (exposed parameter) to control background music volume.
Sfx Group PathMaster/SFXPath of the mixer's group to control sound effects music volume.
Sfx Volume Handle NameSFX VolumeName of the mixer's handle (exposed parameter) to control sound effects volume.
Voice Group PathMaster/VoicePath of the mixer's group to control voice volume.
Voice Volume Handle NameVoice VolumeName of the mixer's handle (exposed parameter) to control voice volume.

Backgrounds

PropertyDefault ValueDescription
Default MetadataObject RefMetadata to use by default when creating background actors and custom metadata for the created actor ID doesn't exist.
MetadataObject RefMetadata to use when creating background actors with specific IDs.
Shared PosesObject RefNamed states (poses) shared between the backgrounds; pose name can be used as appearance in @back commands to set enabled properties of the associated state.
Scene Origin(0.50, 0.00)Reference point on scene to be considered as origin for the managed actors. Doesn't affect positioning.
Z Offset100Initial Z-axis offset (depth) from actors to the camera to set when the actors are created.
Z Step0.1Distance by Z-axis to set between the actors when they are created; used to prevent z-fighting issues.
Default Duration0.35Default duration (in seconds) for all the actor modifications (changing appearance, position, tint, etc).
Default EasingLinearEasing function to use by default for all the actor modification animations (changing appearance, position, tint, etc).
Auto Show On ModifyTrueWhether to automatically reveal (show) an actor when executing modification commands.

Camera

PropertyDefault ValueDescription
Reference Resolution(1920, 1080)The reference resolution is used to evaluate proper rendering dimensions, so that actors are correctly positioned on scene. As a rule of thumb, set this equal to the resolution of the background textures you make for the game.
Reference PPU100How many pixels correspond to a scene unit. Reducing this will make all the actors appear smaller and vice-versa. Default value of 100 is recommended for most cases.
Match Screen WidthFalseWhether reference scene rectangle width should be matched against screen width. When enabled, relative (scene) position evaluation will use screen border as the origin; otherwise reference resolution is used.
Initial Position(0.00, 0.00, -10.00)Initial world position of the managed cameras.
Custom Camera PrefabNullA prefab with a camera component to use for rendering. Will use a default one when not specified. In case you wish to set some camera properties (background color, FOV, HDR, etc) or add post-processing scripts, create a prefab with the desired camera setup and assign the prefab to this field.
Use UI CameraTrueWhether to render the UI with a dedicated camera. This option is for backward-compatibility and should not be disabled in new projects. Expect issues when disabled (eg, constant uGUI layout rebuilds on camera animations).
Custom UI Camera PrefabNullA prefab with a camera component to use for UI rendering. Will use a default one when not specified. Has no effect when Use UI Camera is disabled
Default Duration0.35Default duration (in seconds) for all the camera modifications (changing zoom, position, rotation, etc).
Default EasingLinearEasing function to use by default for all the camera modifications (changing zoom, position, rotation, etc).
Thumbnail Resolution(240, 140)The resolution in which thumbnails to preview game save slots will be captured.
Hide UI In ThumbnailsFalseWhether to ignore UI layer when capturing thumbnails.

Characters

PropertyDefault ValueDescription
Auto Arrange On AddTrueWhether to evenly distribute characters by X-axis when adding a new character without a specified position.
Arrange Range(0.00, 1.00)Start (x) and end (y) positions (in 0.0 to 1.0 range) relative to scene width representing the range over which the characters are arranged.
Default MetadataObject RefMetadata to use by default when creating character actors and custom metadata for the created actor ID doesn't exist.
MetadataObject RefMetadata to use when creating character actors with specific IDs.
Avatar LoaderCharacter Avatars- (Addressable, Project)Configuration of the resource loader used with character avatar texture resources.
Shared PosesObject RefNamed states (poses) shared between the characters; pose name can be used as appearance in @char commands to set enabled properties of the associated state.
Scene Origin(0.50, 0.00)Reference point on scene to be considered as origin for the managed actors. Doesn't affect positioning.
Z Offset50Initial Z-axis offset (depth) from actors to the camera to set when the actors are created.
Z Step0.1Distance by Z-axis to set between the actors when they are created; used to prevent z-fighting issues.
Default Duration0.35Default duration (in seconds) for all the actor modifications (changing appearance, position, tint, etc).
Default EasingSmooth StepEasing function to use by default for all the actor modification animations (changing appearance, position, tint, etc).
Auto Show On ModifyTrueWhether to automatically reveal (show) an actor when executing modification commands.

Choice Handlers

PropertyDefault ValueDescription
Default Handler IdButton ListID of the choice handler to use by default.
Choice Button Loader- (Addressable, Project)Configuration of the resource loader used for loading custom choice buttons.
Default MetadataObject RefMetadata to use by default when creating choice handler actors and custom metadata for the created actor ID doesn't exist.
MetadataObject RefMetadata to use when creating choice handler actors with specific IDs.
Default Duration0.35Default duration (in seconds) for all the actor modifications (changing appearance, position, tint, etc).
Default EasingLinearEasing function to use by default for all the actor modification animations (changing appearance, position, tint, etc).
Auto Show On ModifyTrueWhether to automatically reveal (show) an actor when executing modification commands.

Custom Variables

PropertyDefault ValueDescription
Predefined VariablesObject RefThe list of variables to initialize by default. Global variables (names starting with g_) are initialized on first application start, and others on each state reset.

Engine

PropertyDefault ValueDescription
Override Objects LayerFalseWhether to assign a specific layer to all the engine objects. Engine's camera will use the layer for the culling mask. Use this to isolate Naninovel objects from being rendered by other cameras.
Objects Layer0When Override Objects Layer is enabled, the specified layer will be assigned to all the engine objects.
Async Exception Log TypeErrorLog type to use for UniTask-related exceptions.
Async InstantiationTrueWhether to use Object.InstantiateAsync for instantiating engine objects, which moves most associated work off the main thread. Keep enabled unless experiencing issues.
Initialize On Application LoadTrueWhether to automatically initialize the engine when application starts.
Scene IndependentTrueWhether to apply DontDestroyOnLoad to the engine objects, making their lifetime independent of any loaded scenes. When disabled, the objects will be part of the Unity scene where the engine was initialized and will be destroyed when the scene is unloaded.
Show Initialization UITrueWhether to show a loading UI while the engine is initializing.
Custom Initialization UINullUI to show while the engine is initializing (when enabled). Will use a default one when not specified.
Enable BridgingTrueWhether to automatically start the bridging server to communicate with external Naninovel tools: IDE extension, web editor, etc.
Auto Generate MetadataTrueWhether to automatically generate project metadata when Unity editor is started and after compiling C# scripts.
Naninovel Project RootRoot directory of the Naninovel project, relative to the Unity project root. By default, equals the Unity project root (empty value).

Naninovel will generate a .nani folder under the selected root, where it'll store generated project metadata and communicate with the authoring tools via file-based IPC.
Enable Development ConsoleTrueWhether to enable development console.
Debug Only ConsoleFalseWhen enabled, development console will only be available in development (debug) builds.

Input

PropertyDefault ValueDescription
Spawn Event SystemTrueWhether to spawn an event system when initializing.
Custom Event SystemNullA prefab with an EventSystem component to spawn for input processing. Will spawn a default one when not specified.
Spawn Input ModuleTrueWhether to spawn an input module when initializing.
Custom Input ModuleNullA prefab with an InputModule component to spawn for input processing. Will spawn a default one when not specified.
Input ActionsNullWhen Unity's new input system is installed, assign input actions asset here.

To map input actions to Naninovel's input bindings, create Naninovel action map and add actions with names equal to the binding names (found below under Control Scheme -> Bindings list).

Be aware, that 2-dimensional (Vector2) axes are not supported.
Process Legacy BindingsTrueWhether to process legacy input bindings. Disable in case you're using Unity's new input system and don't want the legacy bindings to work in addition to input actions.
Touch Frequency Limit0.1Limits frequency of the registered touch inputs, in seconds. For legacy input only.
Touch Distance Limit25Limits distance of the registered touch inputs, in pixels. For legacy input only.
Detect Input ModeTrueWhether to change input mode when associated device is activated. Eg, switch to gamepad when any gamepad button is pressed and switch back to mouse when mouse button clicked. Requires new input system.
BindingsObject RefBindings to process input for; find descriptions for each default input in the 'Input Processing' guide.

Localization

PropertyDefault ValueDescription
LoaderLocalization- (Addressable, Project)Configuration of the resource loader used with the localization resources.
LanguagesObject RefRFC5646 language tags mapped to default language display names. Restart Unity editor for changes to take effect.
Source LocaleEnLocale of the source project resources (language in which the project assets are being authored).
Default LocaleNullLocale selected by default when running the game for the first time. Will select Source Locale when not specified.
Auto Detect LocaleTrueWhen enabled and the game is running for the first time, attempts to automatically detect locale based on system language. When succeeds and the locale is supported by the game, selects it; otherwise falls back to 'Default Locale'.
Record Separator
Annotation Prefix>Text character to insert before annotation lines to distinguish them for the localized text. Annotations are comments optionally added to the generated localization documents to provide additional context for the translators, such as author of the printed text messages, inlined commands and command lines containing localized parameters. Stub character is used to replace localized parts of such annotations, as they're duplicated on the next comment line containing the text to localize.

Managed Text

PropertyDefault ValueDescription
LoaderText- (Addressable, Project)Configuration of the resource loader used with the managed text documents.
Multiline DocumentsObject RefLocal resource paths of the managed text documents for which to use multiline format.

Movies

PropertyDefault ValueDescription
LoaderMovies- (Addressable, Project)Configuration of the resource loader used with movie resources.
Skip On InputTrueWhether to skip movie playback when user activates cancel input keys.
Skip FramesTrueWhether to skip frames to catch up with current time.
Fade Duration1Time in seconds to fade in/out before starting/finishing playing the movie.
Custom Fade TextureNullTexture to show while fading. Will use a simple black texture when not specified.
Play Intro MovieFalseWhether to automatically play a movie after engine initialization and before showing the main menu.
Intro Movie NameNullPath to the intro movie resource.

Resource Provider

PropertyDefault ValueDescription
Resource PolicyConservativeDictates when the resources are loaded and unloaded during script execution:
• Conservative — The default mode with balanced memory utilization. All the resources required for script execution are preloaded when starting the playback and unloaded when the script has finished playing. Scripts referenced in @gosub commands are preloaded as well. Additional scripts can be preloaded by using hold parameter of @goto command.
• Optimistic — All the resources required by the played script, as well all resources of all the scripts specified in @goto and @gosub commands are preloaded and not unloaded unless release parameter is specified in @goto command. This minimizes loading screens and allows smooth rollback, but requires manually specifying when the resources have to be unloaded, increasing risk of out of memory exceptions.
Remove ActorsTrueWhether to automatically remove unused actors (characters, backgrounds, text printers and choice handlers) when unloading script resources. Note, that even when enabled, it's still possible to remove actors manually with @remove commands at any time.
Log Resource LoadingFalseWhether to log resource un-/loading operations.
Enable Build ProcessingTrueWhether to register a custom build player handle to process the assets assigned as Naninovel resources.

Warning: In order for this setting to take effect, it's required to restart the Unity editor.
Use AddressablesTrueWhen the Addressable Asset System is installed, enabling this property will optimize asset processing step improving the build time.
Auto Build BundlesTrueWhether to automatically build the addressable asset bundles when building the player. Has no effect when Use Addressables is disabled.
Allow Addressable In EditorFalseWhether to use addressable provider in editor. Enable if you're manually exposing resources via addressable address instead of assigning them with Naninovel's resource managers. Be aware, that enabling this could cause issues when resources are assigned both in resources manager and registered with an addressable address and then renamed or duplicated.
Label By ScriptsTrueWhether to label all the Naninovel addressable assets by the scenario script path they're used in. When Bundle Mode is set to Pack Together By Label in the addressable group settings, will result in a more efficient bundle packing.

Note that script labels will be assigned to all the assets with 'Naninovel' label, which includes assets manually exposed to the addressable resource provider (w/o using the resource editor menus).
Group By CategoryFalseWhether to create an addressable group per Naninovel resource category: scripts, characters, audio, etc. When disabled, will use single Naninovel group for all the resources.
Extra LabelsNullAddressable provider will only work with assets, that have the assigned labels in addition to Naninovel label. Can be used to filter assets used by the engine based on custom criteria (eg, HD vs SD textures).
Local Root Path%DATA%/ResourcesPath root to use for the local resource provider. Can be an absolute path to the folder where the resources are located, or a relative path with one of the available origins:
• %DATA% — Game data folder on the target device (UnityEngine.Application.dataPath).
• %PDATA% — Persistent data directory on the target device (UnityEngine.Application.persistentDataPath).
• %STREAM% — StreamingAssets folder (UnityEngine.Application.streamingAssetsPath).
• %SPECIAL{F}% — An OS special folder (where F is value from System.Environment.SpecialFolder).
Video Stream Extension.mp 4When streaming videos under WebGL (movies, video backgrounds), specify the extension of the video files.
Project Root PathNaninovelPath relative to Resources folders, under which the naninovel-specific assets are located.

Script Player

PropertyDefault ValueDescription
Default Skip ModeRead OnlyDefault skip mode to set when the game is first started.
Skip Time Scale10Time scale to use when in skip (fast-forward) mode.
Min Auto Play Delay1Minimum seconds to wait before executing next command while in auto play mode.
Complete On ContinueTrueWhether to instantly complete blocking (wait!) commands performed over time (eg, animations, hide/reveal, tint changes, etc) when Continue input is activated.
Show Debug On InitFalseWhether to show player debug window on engine initialization.
Wait By DefaultFalseWhether to wait the played commands when the wait parameter is not explicitly specified. Only applicable to the awaitable (asynchronous) commands.
Show Loading UITrueWhether to show ILoadingUI while a script is pre-/loaded. Allows masking resource loading process with the loading screen.
Resolve ModeNearestThe mode in which script player handles missing playback spots when loading state. This may happen when player saved a game amidst a scenario script, which is then changed (eg, via a game update) and the saved playback spot (line and inline indexes) is no longer available.
• Nearest — Attempt to play from the nearest next spot; in case no next spots found (script was made shorter), start from nearest previous one. Most forgiving mode, but could cause an undefined behaviour.
• Restart — Start playing current script from start. Won't cause undefined behaviour in case all the state is local to scenario script, but player will have to re-play the script form the start.
• Error — Throw an error. Choose this option in case undefined behaviour is not acceptable.

Scripts

PropertyDefault ValueDescription
LoaderScripts- (Addressable, Project)Configuration of the resource loader used with naninovel script resources.
Scenario RootAssets/ScenarioDirectory path relative to the Unity project root, where all the scenario script assets (.nani files) are stored.
Script ParserNaninovel Script Asset ParserIScriptParser implementation to use for creating script assets from text. Reimport script assets after modifying this setting for changes to take effect.
Compiler Localization(Naninovel.Compiler Localization)Locale-specific NaniScript compiler options. Will propagate to IDE extension on metadata sync. Restart Unity editor and reimport script assets for changes to take effect.
Stable IdentificationFalseWhether to automatically write identifiers to all the localizable text parameters in imported scripts. Enable to persist associations (eg, localization and voiceover) while editing text content. Re-import the scripts for the change to take effect.
Initialization ScriptNullLocal resource path of the script to play right after the engine initialization.
Title ScriptNullLocal resource path of the script to play when showing the Title UI. Can be used to setup the title screen scene (background, music, etc).
Start Game ScriptNullLocal resource path of the script to play when starting a new game. Will use first available when not specified.
Auto Add ScriptsTrueWhether to automatically add created naninovel scripts to the resources.
Auto Resolve PathTrueWhether to automatically resolve and update resource paths whenever scripts are created, renamed or moved.
Hot Reload ScriptsTrueWhether to reload modified (both via visual and external editors) scripts and apply changes during play mode without restarting the playback.
Watch ScriptsTrueWhether to run a file system watcher over '.nani' files in the specified 'Scenario Root'. Required to register script changes when edited with an external application.
Show Script NavigatorFalseWhether to auto-show script navigator UI after engine is initialized (requires 'IScriptNavigatorUI' available in UI resources).
Enable Visual EditorTrueWhether to show visual script editor when a script is selected.
Hide Unused ParametersTrueWhether to hide un-assigned parameters of the command lines when the line is not hovered or focused.
Select Played ScriptTrueWhether to automatically select currently played script when visual editor is open.
Insert Line KeySpaceHot key used to show 'Insert Line' window when the visual editor is in focus. Set to 'None' to disable.
Insert Line ModifierControlModifier for the 'Insert Line Key'. Set to 'None' to disable.
Indent Line KeyRight ArrowHot key used to indent lines. Set to 'None' to disable.
Indent Line ModifierControlModifier for the 'Indent Line Key'. Set to 'None' to disable.
Unindent Line KeyLeft ArrowHot key used to un-indent lines. Set to 'None' to disable.
Unindent Line ModifierControlModifier for the 'Unindent Line Key'. Set to 'None' to disable.
Save Script KeySHot key used to save (serialize) the edited script when the visual editor is in focus. Set to 'None' to disable.
Save Script ModifierControlModifier for the 'Save Script Key'. Set to 'None' to disable.
Rewind Mouse Button0When clicked a line in visual editor, which mouse button should activate rewind: '0' is left, '1' right, '2' middle; set to '-1' to disable.
Rewind ModifierShiftModifier for 'Rewind Mouse Button'. Set to 'None' to disable.
Editor Page Length300How many script lines should be rendered per visual editor page.
Editor Custom Style SheetNullAllows modifying default style of the visual editor.
Graph OrientationHorizontalWhether to build the graph vertically or horizontally.
Graph Auto Align Padding(10.00, 0.00)Padding to add for each node when performing auto align.
Show SynopsisTrueWhether to show fist comment lines of the script inside the graph node.
Graph Custom Style SheetNullAllows modifying default style of the script graph.
Enable Community ModdingFalseWhether to allow adding external naninovel scripts to the build.
External LoaderScripts- (Local)Configuration of the resource loader used with external naninovel script resources.

Spawn

PropertyDefault ValueDescription
LoaderSpawn- (Addressable, Project)Configuration of the resource loader used with spawn resources.

State

PropertyDefault ValueDescription
Save Folder NameNaninovel Data/SavesThe folder will be created in the game data folder.
Default Settings Slot IdSettingsThe name of the settings save file.
Default Global Slot IdGlobal SaveThe name of the global save file.
Save Slot MaskGame Save{0:000}Mask used to name save slots.
Quick Save Slot MaskGame Quick Save{0:000}Mask used to name quick save slots.
Save Slot Limit99Maximum number of save slots.
Quick Save Slot Limit18Maximum number of quick save slots.
Binary Save FilesTrueWhether to compress and store the saves as binary files (.nson) instead of text files (.json). This will significantly reduce the files size and make them harder to edit (to prevent cheating), but will consume more memory and CPU time when saving and loading.
Reset On GotoFalseWhether to reset state of the engine services when loading another script via @goto command. Can be used instead of @resetState command to automatically unload all the resources on each goto.
Enable State RollbackTrueWhether to enable state rollback feature allowing player to rewind the script backwards.
State Rollback Steps1024The number of state snapshots to keep at runtime; determines how far back the rollback (rewind) can be performed. Increasing this value will consume more memory.
Saved Rollback Steps128The number of state snapshots to serialize (save) under the save game slots; determines how far back the rollback can be performed after loading a saved game. Increasing this value will enlarge save game files.
Game State HandlerNaninovel Universal Game State SerializerImplementation responsible for de-/serializing local (session-specific) game state; see State Management guide on how to add custom serialization handlers.
Global State HandlerNaninovel Universal Global State SerializerImplementation responsible for de-/serializing global game state; see State Management guide on how to add custom serialization handlers.
Settings State HandlerNaninovel Universal Settings State SerializerImplementation responsible for de-/serializing game settings; see State Management guide on how to add custom serialization handlers.

Text Printers

PropertyDefault ValueDescription
Default Printer IdDialogueID of the text printer to use by default.
Default Base Reveal Speed0.5Base reveal speed (game settings) to set when the game is first started.
Default Base Auto Delay0.5Base auto delay (game settings) to set when the game is first started.
Max Reveal Delay0.06Delay limit (in seconds) when revealing (printing) the text messages. Specific reveal speed is set via message speed in the game settings; this value defines the available range (higher the value, lower the reveal speed).
Max Auto Wait Delay0.02Delay limit (in seconds) per each printed character while waiting to continue in auto play mode. Specific delay is set via auto delay in the game settings; this value defines the available range.
Scale Auto WaitTrueWhether to scale the wait time in auto play mode by the reveal speed set in the print commands.
Default MetadataObject RefMetadata to use by default when creating text printer actors and custom metadata for the created actor ID doesn't exist.
MetadataObject RefMetadata to use when creating text printer actors with specific IDs.
Scene Origin(0.50, 0.00)Reference point on scene to be considered as origin for the managed actors. Doesn't affect positioning.
Z Offset0Initial Z-axis offset (depth) from actors to the camera to set when the actors are created.
Z Step0Distance by Z-axis to set between the actors when they are created; used to prevent z-fighting issues.
Default Duration0.35Default duration (in seconds) for all the actor modifications (changing appearance, position, tint, etc).
Default EasingLinearEasing function to use by default for all the actor modification animations (changing appearance, position, tint, etc).
Auto Show On ModifyFalseWhether to automatically reveal (show) an actor when executing modification commands.

UI

PropertyDefault ValueDescription
UI LoaderUI- (Addressable, Project)Configuration of the resource loader used with UI resources.
Font LoaderFonts- (Addressable, Project)Configuration of the resource loader used with font resources.
Override Objects LayerTrueWhether to assign a specific layer to all the UI objects managed by the engine. Required for some of the built-in features, eg Toggle UI.
Objects Layer5When Override Objects Layer is enabled, the specified layer will be assigned to all the managed UI objects.
Font OptionsObject RefFont options, that should be available in the game settings UI (in addition to Default) for the player to choose from.
Default FontNullFont name from Font Options to apply by default when the game is first started. When not specified, Default font is applied.

Unlockables

PropertyDefault ValueDescription
LoaderUnlockables- (Addressable, Project)Configuration of the resource loader used with unlockable resources.