Hello,
Thank you for your suggestion and for being the first person besides me to comment on this forum. 🙂
I will likely add this feature to Curve Architect. If everything goes as planned, I will update Curve Architect next week. I don't know if this will be included in that update, but it will likely be in the one after that.
Currently, you can achieve this with a script, and it's not that hard to do.
Example:
using UnityEngine;
using UnityEditor;
using CurveArchitect.Objects;
public static class MenuItems
{
[MenuItem("GameObject/3D Object/Architect Curve Json", false, 100)]
public static void CreateDeformCurveFromJson()
{
GameObject go = new GameObject("ArchitectCurve from json");
ArchitectCurve ac = go.AddComponent<ArchitectCurve>();
go.AddComponent<ArchitectCurveCache>();
//Load data from json and and set positions for anchors and tangents.
HandleSegement.CreateSegement(ac, 0, new Vector3(0, 0, 0), new Vector3(3, 0, 0), new Vector3(-3, 0, 0));
HandleSegement.CreateSegement(ac, 0, new Vector3(0, 0, 8), new Vector3(3, 0, 8), new Vector3(-3, 0, 8));
}
}
Note: Remember that your script needs to be within an "Editor" folder. You can place this folder wherever you want, but it needs to be named "Editor." Otherwise, you won't be able to access the Editor part of the "CurveArchitect" namespace.