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
graphGraph<TNode>Graph where the node will be added
nodeTypeTypeNode to add.
initialPositionVector2The initial position the node will be displayed in the visual representation.
namestringName of the node
Returns
- TNode
The newly created node.
Type Parameters
TNodeThe type of the node to add.