rabidus-test/Assets/Dreamteck/Splines/Editor/Primitives/SpiralEditor.cs

36 lines
1.1 KiB
C#
Raw Normal View History

2023-07-24 16:38:13 +03:00
using UnityEngine;
using System.Collections;
using UnityEditor;
using Dreamteck.Splines.Editor;
namespace Dreamteck.Splines.Primitives
{
public class SpiralEditor : PrimitiveEditor
{
public override string GetName()
{
return "Spiral";
}
public override void Open(DreamteckSplinesEditor editor)
{
base.Open(editor);
primitive = new Spiral();
}
protected override void OnGUI()
{
base.OnGUI();
Spiral spiral = (Spiral)primitive;
spiral.clockwise = EditorGUILayout.Toggle("Clockwise", spiral.clockwise);
spiral.curve = EditorGUILayout.CurveField("Radius Interpolation", spiral.curve);
spiral.startRadius = EditorGUILayout.FloatField("Start Radius", spiral.startRadius);
spiral.endRadius = EditorGUILayout.FloatField("End Radius", spiral.endRadius);
spiral.stretch = EditorGUILayout.FloatField("Stretch", spiral.stretch);
spiral.iterations = EditorGUILayout.IntField("Iterations", spiral.iterations);
}
}
}