예제 #1
0
 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);
 }
예제 #2
0
        void DeleteComponentOperation(TypeHandle componentType)
        {
            var action = new RemoveOperationForComponentTypeInCreateEntityNodeAction(Model, componentType);

            m_Store.Dispatch(action);
        }