Example #1
0
 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);
 }
Example #2
0
        void AddComponentOperation(TypeHandle componentType)
        {
            var action = new SetOperationForComponentTypeInCreateEntityNodeAction(Model, componentType);

            m_Store.Dispatch(action);
        }