Added support for link areas.

This commit is contained in:
Alexander Filippov 2024-04-01 06:37:01 +02:00
parent 6b0748c755
commit ece3b56a02
2 changed files with 3 additions and 2 deletions

View File

@ -76,6 +76,7 @@ namespace FrameJosh.SplineImporter
endPoint = endHit.position; endPoint = endHit.position;
link.startPoint = startPoint; link.startPoint = startPoint;
link.endPoint = endPoint; link.endPoint = endPoint;
link.area = NavMesh.GetAreaFromName(splineImporter.area);
Undo.RegisterCreatedObjectUndo(go, $"Create link from {startPoint} to {endPoint}"); Undo.RegisterCreatedObjectUndo(go, $"Create link from {startPoint} to {endPoint}");
#endif #endif
} }
@ -146,8 +147,8 @@ namespace FrameJosh.SplineImporter
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
public TextAsset splineData; public TextAsset splineData;
public float3 scale = new(1f, 1f, 1f); public float3 scale = new(1f, 1f, 1f);
public string area = "Walkable";
#endif #endif
} }
#if UNITY_EDITOR #if UNITY_EDITOR

View File

@ -1,6 +1,6 @@
{ {
"name": "ru.shazbot.spline-importer", "name": "ru.shazbot.spline-importer",
"version": "3.0.0", "version": "3.1.0",
"displayName": "Spline Importer", "displayName": "Spline Importer",
"description": "Import and export splines between Blender and Unity.", "description": "Import and export splines between Blender and Unity.",
"unity": "2021.3", "unity": "2021.3",