Shape Tracer
Shape tracer allow you to extrude shape along a path. You simply have to create your Shape on the Shape Editor, setup your path and choose the Shape you want to extrude !
Shape Tracer Path component
The Shape Tracer Path
take a Shape Asset
as input and extrude it on a bezier curve.
If the input Shape Asset
is empty, you can create a new one with the Create
button. Also you can edit the current shape with the button Edit
You can create a new Shape Tracer Path
from GameObject/3D Objects/Shape Tracer Path
You can edit the curve with transformation tools:
Press Escape to deselect point.
Shape Tracer Path
Settings:
Shape Asset
Shapes
are the cross sections extruded by the Shape Tracer Path
. Can be edited from the Shape Editor Window.
You can create a Shape Asset
from Create/Shape Tracer/Shape or from a Shape Tracer Path
with a empty shape.
On the asset, select Open Shape Editor to open the Shape Editor Window and edit the shape. Also you can select Edit on a Shape Tracer Path
.
Toggle Close Shape to make loop your shape.
By default, you have two tools:
Press F to center view and Escape to deselect current tool (reset on Move tool by default).
Custom Shape Editor Window Tools
You also can create your own shape tools inheriting Shape Tool class. Must be in the Editor assembly of the plugin ! Use Shape Tool Attribute to modify the tool icon (Name, Icon Path, Tooltip, Order).
using UnityEditor;
using UnityEngine;
namespace SorangonToolset.ShapeTracer.Shapes.Tools {
[ShapeTool("Custom", "A custom tool", 50)]
public class CustomTool : ShapeEditorTool {
public override void Process() {
Handles.BeginGUI();
Handles.color = Color.yellow;
for(int i = 0; i < Editor.Asset.shape.PointCount; i++) {
//Get the shape point position
Vector2 pointPos = Editor.Asset.shape.GetVerticePosition(i);
//Point local space to window space
pointPos = Editor.PointSpaceToWindowSpace(pointPos);
Handles.DotHandleCap(0, pointPos, Quaternion.identity, 10f, EventType.Repaint);
}
Handles.EndGUI();
}
}
}