Blender → Unity Spline Exporter
A simple free pipeline for exporting Bezier curves from Blender to Unity Splines using JSON.
The project consists of two tools:
Blender Curve Exporter — exports selected Blender curves to JSON. Unity Curve Importer — imports one or multiple JSON files and creates Unity SplineContainer objects.
The goal is to make transferring curves between Blender and Unity fast and convenient for artists, without manual coordinate conversion or rebuilding splines in Unity.
✨ Features Blender Export multiple selected Curve objects at once. Exports all splines contained inside a Curve object. Preserves: point positions Bezier handles cyclic/closed state spline type Automatically converts object coordinates to world space. Generates one JSON file per Curve object. Can be installed as a regular Blender addon. Simple Export Selected Curves workflow. Unity Import one or multiple JSON files. Drag & drop multiple JSON files directly from the Unity Project window. Creates SplineContainer objects automatically. Supports Blender → Unity coordinate conversion. Supports three tangent modes: Imported — use Bezier handles exported from Blender. Auto — automatically calculate smooth tangents in Unity. Linear — create linear spline segments. Multiple JSON files can be imported in one operation. Shows a preview with: number of files number of splines number of points number of closed splines
📦 ------------- Installation -----------
Blender Download the Blender addon .py file from this repository. Open Blender. Go to:
Edit → Preferences → Add-ons
Click Install... Select:
unity_curve_exporter.py
Enable the addon.
After installation, open the 3D Viewport sidebar with:
N
You should see a new:
Unity
Copy the Unity importer script into:
Assets/Editor/
For example:
Assets/ └── Editor/ └── JsonSplineImporterWindow.cs
Unity should compile the script automatically.
Open the importer with:
Tools → Curve Importer
The importer requires the Unity Splines package.
🚀 ------------------- Quick Start -------------------
- Create a curve in Blender
Create or select one or more Curve objects.
For example:
Road_Main Road_Left Road_Right Road_01 Road_02
You can select all of them at once.
- Export curves from Blender
Open:
N → Unity
The Unity panel will show the number of selected curves.
Click:
EXPORT SELECTED CURVES
Each Curve object will be exported to a separate JSON file.
For example:
Road_Main_curve.json Road_Left_curve.json Road_Right_curve.json Road_01_curve.json Road_02_curve.json
The files are exported to the configured output directory.
- Import curves into Unity
Open:
Tools → Curve Importer
You can either add files manually or simply drag multiple JSON files from the Unity Project window directly into the importer.
For example, select:
Road_Main_curve.json Road_Left_curve.json Road_Right_curve.json
and drag them into the JSON FILES area.
All files will be added automatically.
- Choose Tangent Mode
Before importing, select the desired tangent mode.
Imported
Uses the actual Bezier handles exported from Blender.
This is useful when the curve shape and handles were carefully edited in Blender.
Auto
Unity automatically calculates smooth tangent handles.
This is equivalent to selecting the spline points in Unity and using the Auto tangent mode.
This is the recommended option when you want smooth automatically generated curves.
Linear
Creates straight segments between spline points.
Useful for roads, paths or other geometry where the curve should pass directly from one point to another.
- Import
Click:
IMPORT SPLINE
or, when multiple files are loaded:
IMPORT X SPLINES
Unity will create a separate GameObject for each JSON file.
The exporter also uses the Blender object's world transform, so the object's location, rotation and scale are taken into account during export.
Each Curve object contains one or more splines.
Each spline contains a list of points.
Bezier points contain: position, left, right.
This makes the format simple and easy to modify or generate from other tools.
This allows curves to be edited in Blender and transferred to Unity without manually recreating them.
The importer currently targets Unity's Splines system.
Make sure the Splines package is installed in your Unity project.
The tool is primarily intended for transferring curve data between Blender and Unity. It does not export Blender curve geometry or materials — only spline/control-point information.
🤝 Contributing
Pull requests and improvements are welcome.
If you find a bug or have an idea for improving the workflow, feel free to open an Issue or submit a Pull Request.
📜 License
This project is free to use, modify and distribute.