static State RemoveOperationForType(State previousState, RemoveOperationForComponentTypeInCreateEntityNodeAction action) { Undo.RegisterCompleteObjectUndo(action.Model.NodeAssetReference, "Remove Operation For Type In Instantiate Node"); action.Model.DeleteComponentOperation(action.ComponentType); action.Model.DefineNode(); //TODO eventually we'll need to figure how to chain the changes required around the ports & edges. //This will require the rework surrounding trackable ports ((VSGraphModel)action.Model.GraphModel).LastChanges.ChangedElements.Add(action.Model); ((VSGraphModel)action.Model.GraphModel).LastChanges.DeletedElements++; EditorUtility.SetDirty(action.Model.NodeAssetReference); return(previousState); }
void DeleteComponentOperation(TypeHandle componentType) { var action = new RemoveOperationForComponentTypeInCreateEntityNodeAction(Model, componentType); m_Store.Dispatch(action); }