Tested successfully on 2019.4.24f and 2021.1.13f using Naninovel v1.16 and v1.17.

Think positioning your characters within Naninovel involves too much guesswork? Do you want to manually position your Naninovel actors in your scene but find the task of writing down the values too tedious? Do you have a complex 3D scene set up outside of Naninovel and you'd like to convert their transforms into Naninovel commands? I've created an editor script that is meant to solve these problems.

Table of contents

Video presentation

https://www.youtube.com/watch?v=B-0f5vg8JWQ

Setup

Right click and download the .cs file below and drop it into an Editor folder in your Unity project. If there isn't one, then you can create one yourself under the Assets folder for example. You can read more about how editor folders work here: https://docs.unity3d.com/Manual/SpecialFolders.html

NaninovelTransformer.cs

Last updated on 25th of August 0.23 (Eastern European time zone) Changelog:

Guide

With this editor script, you can copy the transforms (position, pos, rotation, scale, camera offset and zoom) of a single actor or all transformable objects in the scene and paste them into your Naninovel script. To further automate the process, I've made it possible to have correct command automatically prepended to the copied string if the selected object contains a certain component (Camera) or the name of the root object corresponds with any entries found in one of these menus:

So for instance, say you have a character called Kohaku in the scene. You want to manually position it via the Scene tab. Unfold the engine objects and click on the character object. Make sure to transform the topmost object (Rule of thumb: It is always the id of the actor without any added strings) in the character's hierarchy, do not transform any other object (this doesn't apply to Camera, see graphic for more information). If you accidentally modify the wrong object, make sure to reset its transform properties to defaults.

Untitled

After clicking on the object, go and modify its Transform values.

Untitled