csharp
public sealed class SplineCommandOne spline edit, as something the undo stack can take back.
Remarks
⚠ The whole point list, before and after. An edit that inserts or removes a point moves every index after it, so a per-point record would have to reason about that; a snapshot of a hundred points is three kilobytes and reasons about nothing. It is the same trade TerrainStrokeCommand makes in the other direction, for the other reason.
Fields and properties (1)
public string NameWhat this is called in the undo history, as a person would say it.
Methods (4)
public SplineCommand(SplineAsset asset, SplinePoint[] before, SplinePoint[] after)Records an edit that has already been applied to the asset.
public void Do(EditorContext context)Applies the change.
public void Undo(EditorContext context)Puts back exactly what Do changed.
public bool TryMergeWith(IEditorCommand previous, out IEditorCommand? merged)
Used by (2)
- SplineEditVixen.Editor.SceneView
- SplineEditTestsVixen.Editor.SceneView.Tests