static State SetOperationForType(State previousState, SetOperationForComponentTypeInInstantiateNodeAction action) { Undo.RegisterCompleteObjectUndo(action.Model.NodeAssetReference, "Set Operation For Type In Instantiate Node"); action.Model.SetComponentOperation(action.ComponentType, action.Operation); 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 EditorUtility.SetDirty(action.Model.NodeAssetReference); ((VSGraphModel)action.Model.GraphModel).LastChanges.ChangedElements.Add(action.Model); return(previousState); }
void SetComponentOperation(TypeHandle componentType, ComponentOperation.ComponentOperationType newValue) { var action = new SetOperationForComponentTypeInInstantiateNodeAction(Model, componentType, newValue); m_Store.Dispatch(action); }