Beispiel #1
0
        public static void SetNodePosition(InstructionGraph graph, InstructionGraphNode.NodeData node, Vector2 position, bool isStart)
        {
            using (new UndoScope(isStart ? graph as ScriptableObject : node.Node, true))
            {
                node.Position = position;

                if (isStart)
                {
                    graph.StartPosition = position;
                }
            }
        }
Beispiel #2
0
 public static void ChangeConnectionTarget(InstructionGraph graph, InstructionGraphNode.ConnectionData connection, InstructionGraphNode.NodeData target, bool isStart)
 {
     using (new UndoScope(isStart ? graph as ScriptableObject : connection.From, true))             // From is only node that changes in this method - the rest will be rebuild automatically
     {
         connection.ChangeTarget(target);
     }
 }