csharp
public sealed class CreateEntityCommandCreating an entity, undoably.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ The entity is created by Do and not by the constructor. A command that had already done its work before being executed would do it twice on a redo — and the handle a redo produces has to be the same one, which is what makes the snapshot the right way to undo it.
Fields and properties (3)
Methods (5)
public CreateEntityCommand(SceneDocument document, string name, LocalTransform local, Entity parent = default(Entity))Describes creating an entity.
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)Absorbs the entry below this one, so that the two become one undo step.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (1)
- SceneDocumentVixen.Editor.SceneView