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 Player, Elringus.Naninovel.Runtime, Version=0.0.0.0, Culture=neutral, Public Key Token=nullIAudioPlayer 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.
Auto Voice ModeText IdWhen auto voicing is enabled, controls method to associate voice clips with @print commands:
• Text ID — Voice clips are associated by localizable text IDs. Removing, adding or re-ordering scenario script lines won't break the associations. Modifying printed text will break associations unless stable text identification is enabled.
• Playback Spot — Voice clips are associated by script name, line and inline indexes (playback spot). Removing, adding or re-ordering scenario script lines will break the associations. Modifying printed text will not break associations.
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.
Custom Audio MixerNullAudio mixer to control audio groups. When not provided, 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.5, 0.0)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.0, 0.0, -10.0)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.0, 1.0)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.5, 0.0)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_ or g_) are initialized on first application start, and others on each state reset.

Engine

PropertyDefault ValueDescription
Generated Data PathNaninovel DataRelative (to the application data directory) path to store the automatically generated assets.
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.
Type AssembliesObject RefWhen looking for various types (eg, actor implementations, serialization handlers, managed text, etc) the engine will only scan the exported types of the specified assemblies for better performance. In case you're keeping your Naninovel-related types outside of Unity's predefined assemblies (using assembly definitions), add the assembly names here.

Warning: Recompile the solution or restart Unity editor after modifying the list in order for changes to take effect.
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 provided.
Enable BridgingFalseWhether to automatically start the bridging server to communicate with external Naninovel tools: IDE extension, web editor, etc.
Server Port41016The network port for the server to listen. Change both here and in the external tools in case the default port is occupied by another application.
Auto Generate MetadataTrueWhether to automatically generate project metadata when Unity editor is started.
Generate Label MetadataTrueWhether to generate metadata used for script labels autocompletion. May take a substantial time when there are a lot of scripts in the project.
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.

Managed Text

PropertyDefault ValueDescription
LoaderText- (Addressable, Project)Configuration of the resource loader used with the managed text documents.
Multiline CategoriesObject RefDocument categories (local resource paths) for which to use multiline document 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 provided.
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 PolicyStaticDictates when the resources are loaded and unloaded during script execution:
• Static — All the resources required for the script execution are preloaded when starting the playback (masked with a loading screen) and unloaded only when the script has finished playing. This policy is default and recommended for most cases.
• Dynamic — Only the resources required for the next Dynamic Policy Steps commands are preloaded during the script execution and all the unused resources are unloaded immediately. Use this mode when targeting platforms with strict memory limitations and it's impossible to properly organize naninovel scripts. Expect hiccups when the resources are loaded in background while the game is progressing.
Dynamic Policy Steps25When dynamic resource policy is enabled, defines the number of script commands to pre-load.
Optimize Loading PriorityTrueWhen dynamic resource policy is enabled, this will set Unity's background loading thread priority to low to prevent hiccups when loading resources during script playback.
Log Resource LoadingFalseWhether to log resource loading operations on the loading screen.
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.
Group By CategoryFalseWhether to create an addressable group per Naninovel resource category: scripts, characters, audio, etc. When disabled, will use a 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 Delay3Minimum seconds to wait before executing next command while in auto play mode.
Complete On ContinueTrueWhether to instantly complete blocking (wait:true) 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 DefaultTrueWhether to wait the played commands when the wait parameter is not explicitly specified.
Unload Assets On PlayTrueWhether to force-unload unused assets before starting script playback. Required to unload released assets from memory when using addressables.
Load On GotoTrueWhether to show ILoadingUI when @goto command requires loading another script. Allows masking resource pre-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.
Script ParserNaninovel.Script Parser, Elringus.Naninovel.Runtime, Version=0.0.0.0, Culture=neutral, Public Key Token=nullIScriptParser implementation to use for creating script assets from text. Don't forget to re-import script assets after modifying this property.
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 ScriptNullName of the script to play right after the engine initialization.
Title ScriptNullName of the script to play when showing the Title UI. Can be used to setup the title screen scene (background, music, etc).
Start Game ScriptNullName of the script to play when starting a new game. Will use first available when not provided.
Auto Add ScriptsTrueWhether to automatically add created naninovel scripts to the resources.
Hot Reload ScriptsTrueWhether to reload modified (both via visual and external editors) scripts and apply changes during playmode without restarting the playback.
Watch ScriptsTrueWhether to run a file system watcher over .nani files in the project. Required to register script changes when edited with an external application.
Watched DirectoryWhen Watch Scripts is enabled, select a specific directory to watch instead of the whole project to reduce CPU usage.
Count Total CommandsFalseWhether to calculate number of commands existing in all the available naninovel scripts on service initialization. If you don't use TotalCommandsCount property of a script manager and CalculateProgress function in naninovel script expressions, disable to reduce engine initialization time.
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.
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.0, 0.0)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 NameSavesThe 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 Serializer, Elringus.Naninovel.Runtime, Version=0.0.0.0, Culture=neutral, Public Key Token=nullImplementation 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 Serializer, Elringus.Naninovel.Runtime, Version=0.0.0.0, Culture=neutral, Public Key Token=nullImplementation responsible for de-/serializing global game state; see State Management guide on how to add custom serialization handlers.
Settings State HandlerNaninovel.Universal Settings State Serializer, Elringus.Naninovel.Runtime, Version=0.0.0.0, Culture=neutral, Public Key Token=nullImplementation 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.5, 0.0)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.