Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

ContextNode.CreateBlockNode

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void CreateBlockNode(int index);

Parameters

Parameter Description
index 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.

Description

Creates and inserts a new BlockNode into this context node.

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.


Declaration

public void CreateBlockNode(Type blockNodeType, int index);

Parameters

Parameter Description
blockNodeType The type of the block node to create and insert. Must inherit from BlockNode..
index 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.

Description

Creates and inserts a new BlockNode into this context node.

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.