CreateBlockNode
Creates and inserts a new BlockNode into this context node.
Read time 2 minutesLast updated 5 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
CreateBlockNode<T>(int)
Creates and inserts a new BlockNode into this context node.
public void CreateBlockNode<TBlockNode>(int index = -1) where TBlockNode : BlockNode, new()
Parameters
Optional. The zero-based index where to insert the block node. Defaults to -1, which appends the block at the bottom of the context node.
Remarks
Use this method when you want to create and add a new block node of a specific type to the context. Consider using ContextNode.AddBlockNode or ContextNode.InsertBlockNode when you already have an existing block node instance, Blocks are ordered vertically: index 0 is the topmost block, and higher indices go toward the bottom. When is less than 0 or equal to the current block count, the block is added at the bottom. Throws ArgumentException if is greater than the current block count.
indexindexCreateBlockNode(Type, int)
Creates and inserts a new BlockNode into this context node.
public void CreateBlockNode(Type blockNodeType, int index = -1)
Parameters
Remarks
Use this method when you want to create and add a new block node of a specific type to the context. Consider using ContextNode.AddBlockNode or ContextNode.InsertBlockNode when you already have an existing block node instance, Blocks are ordered vertically: index 0 is the topmost block, and higher indices go toward the bottom. When is less than 0 or equal to the current block count, the block is added at the bottom. Throws ArgumentException if is greater than the current block count.
indexindex