Click or drag to resize

TreeCreateItem Method

Creates an item in the tree and adds it as a child of parent.

If parent is null, the root item will be the parent, or the new item will be the root itself if the tree is empty.

The new item will be the idxth child of parent, or it will be the last child if there are not enough siblings.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public TreeItem CreateItem(
	Object parent = null,
	int idx = -1
)

Parameters

parent (Optional)
Type: GodotObject

[Missing <param name="parent"/> documentation for "M:Godot.Tree.CreateItem(Godot.Object,System.Int32)"]

idx (Optional)
Type: SystemInt32

[Missing <param name="idx"/> documentation for "M:Godot.Tree.CreateItem(Godot.Object,System.Int32)"]

Return Value

Type: TreeItem

[Missing <returns> documentation for "M:Godot.Tree.CreateItem(Godot.Object,System.Int32)"]

See Also