public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Create/Reset Spline")) { RecordUndo(SplineCreatorRef, "Create/Reset Spline"); SplineCreatorRef.CreateSpline(); TargetSpline = SplineCreatorRef.Spline; } if (GUILayout.Button("Add Point to End")) { RecordUndo(SplineCreatorRef, "Add Point to End."); TargetSpline.AddPointToEnd(); } if (GUILayout.Button("Insert After Active Point")) { RecordUndo(SplineCreatorRef, "Insert point."); TargetSpline.InsertPoint(ActiveIndex); } if (GUILayout.Button("Remove Active Point")) { RecordUndo(SplineCreatorRef, "Remove point."); TargetSpline.RemovePoint(ActiveIndex); } TargetSpline.isLooping = EditorGUILayout.Toggle("Loop", TargetSpline.isLooping); }