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