Method AddNode
AddNode<TNode>(Graph<TNode>, Type, Vector2, string)
Creates and adds a new unlinked node to the graph.
public static TNode AddNode<TNode>(this Graph<TNode> graph, Type nodeType, Vector2 initialPosition, string name) where TNode : BaseNode
Parameters
graph
Graph<TNode>Graph where the node will be added
nodeType
TypeNode to add.
initialPosition
Vector2The initial position the node will be displayed in the visual representation.
name
stringName of the node
Returns
- TNode
The newly created node.
Type Parameters
TNode
The type of the node to add.