Skip to content
Eduard Gushchin edited this page Jun 21, 2026 · 6 revisions

Node

Back to API Reference

Namespace: Electron2D

Summary

Represents the node type.

Declaration

public class Electron2D.Node : Electron2D.Object

Remarks

This type is part of the Electron2D 0.1.0 Preview public API.

Thread Safety

Instances of this type are not synchronized. Access them from the thread that owns the object unless the member documentation states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
Name Property Gets or sets the name value.
Owner Property Gets or sets the owner value.
Electron2D.Node() Constructor Initializes a new instance of the Node type.
AddChild(Electron2D.Node) Method Adds the child value.
AddToGroup(System.String, System.Boolean) Method Adds the to group value.
CreateTween() Method Creates a tween bound to this node.
GetChild(System.Int32) Method Gets the child value.
GetChildCount() Method Gets the child count value.
GetGroups() Method Gets the groups value.
GetIndex() Method Gets the index value.
GetNode(Electron2D.NodePath) Method Gets the node value.
GetNodeOrNull(Electron2D.NodePath) Method Gets the node or null value.
GetParent() Method Gets the parent value.
GetTree() Method Gets the tree value.
IsAncestorOf(Electron2D.Node) Method Checks whether ancestor of is true.
IsInGroup(System.String) Method Checks whether in group is true.
IsInsideTree() Method Checks whether inside tree is true.
MoveChild(Electron2D.Node, System.Int32) Method Executes the move child operation.
QueueFree() Method Executes the queue free operation.
RemoveChild(Electron2D.Node) Method Removes the child value.
RemoveFromGroup(System.String) Method Removes the from group value.
Reparent(Electron2D.Node, System.Boolean) Method Executes the reparent operation.
_EnterTree() Method Called when this node enters a scene tree.
_ExitTree() Method Called when this node exits a scene tree.
_Input(Electron2D.InputEvent) Method Called when an input event is delivered to this node.
_PhysicsProcess(System.Double) Method Called during a fixed physics update.
_Process(System.Double) Method Called during an idle frame update.
_Ready() Method Called when this node and its children are ready.

Member Details

Name

Kind: Property

public System.String Name { get; set; }

Summary

Gets or sets the name value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current name value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

Owner

Kind: Property

public Electron2D.Node Owner { get; set; }

Summary

Gets or sets the owner value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current owner value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

Electron2D.Node()

Kind: Constructor

public Electron2D.Node()

Summary

Initializes a new instance of the Node type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

AddChild(Electron2D.Node)

Kind: Method

public System.Void AddChild(Electron2D.Node)(Electron2D.Node child)

Summary

Adds the child value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • child: The child value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

AddToGroup(System.String, System.Boolean)

Kind: Method

public System.Void AddToGroup(System.String, System.Boolean)(System.String group, System.Boolean persistent)

Summary

Adds the to group value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • group: The group value.
  • persistent: The persistent value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

CreateTween()

Kind: Method

public Electron2D.Tween CreateTween()()

Summary

Creates a tween bound to this node.

Remarks

The node must already be inside a scene tree. The returned tween is processed by that tree and pauses automatic advancement while this node is outside the tree or no longer valid.

Use Electron2D.SceneTree.CreateTween when the tween should not be bound to a specific node lifetime.

Returns

A valid Electron2D.Tween registered in the current Electron2D.SceneTree and bound to this node.

Exceptions

  • System.InvalidOperationException: Thrown when this node is not currently inside a Electron2D.SceneTree.

Thread Safety

This method is not synchronized. Call it on the main scene thread that owns this node.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.SceneTree.CreateTween
  • Electron2D.Tween.BindNode(Electron2D.Node)

GetChild(System.Int32)

Kind: Method

public Electron2D.Node GetChild(System.Int32)(System.Int32 index)

Summary

Gets the child value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • index: The index value.

Returns

The current child value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetChildCount()

Kind: Method

public System.Int32 GetChildCount()()

Summary

Gets the child count value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current child count value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetGroups()

Kind: Method

public System.String[] GetGroups()()

Summary

Gets the groups value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current groups value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetIndex()

Kind: Method

public System.Int32 GetIndex()()

Summary

Gets the index value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current index value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetNode(Electron2D.NodePath)

Kind: Method

public Electron2D.Node GetNode(Electron2D.NodePath)(Electron2D.NodePath path)

Summary

Gets the node value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • path: The path value.

Returns

The current node value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetNodeOrNull(Electron2D.NodePath)

Kind: Method

public Electron2D.Node GetNodeOrNull(Electron2D.NodePath)(Electron2D.NodePath path)

Summary

Gets the node or null value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • path: The path value.

Returns

The current node or null value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetParent()

Kind: Method

public Electron2D.Node GetParent()()

Summary

Gets the parent value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current parent value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

GetTree()

Kind: Method

public Electron2D.SceneTree GetTree()()

Summary

Gets the tree value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The current tree value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

IsAncestorOf(Electron2D.Node)

Kind: Method

public System.Boolean IsAncestorOf(Electron2D.Node)(Electron2D.Node node)

Summary

Checks whether ancestor of is true.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • node: The node value.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

IsInGroup(System.String)

Kind: Method

public System.Boolean IsInGroup(System.String)(System.String group)

Summary

Checks whether in group is true.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • group: The group value.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

IsInsideTree()

Kind: Method

public System.Boolean IsInsideTree()()

Summary

Checks whether inside tree is true.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

true when the condition is met; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

MoveChild(Electron2D.Node, System.Int32)

Kind: Method

public System.Void MoveChild(Electron2D.Node, System.Int32)(Electron2D.Node childNode, System.Int32 toIndex)

Summary

Executes the move child operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • childNode: The child node value.
  • toIndex: The to index value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

QueueFree()

Kind: Method

public System.Void QueueFree()()

Summary

Executes the queue free operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

RemoveChild(Electron2D.Node)

Kind: Method

public System.Void RemoveChild(Electron2D.Node)(Electron2D.Node child)

Summary

Removes the child value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • child: The child value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

RemoveFromGroup(System.String)

Kind: Method

public System.Void RemoveFromGroup(System.String)(System.String group)

Summary

Removes the from group value.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • group: The group value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

Reparent(Electron2D.Node, System.Boolean)

Kind: Method

public System.Void Reparent(Electron2D.Node, System.Boolean)(Electron2D.Node newParent, System.Boolean keepGlobalTransform)

Summary

Executes the reparent operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • newParent: The new parent value.
  • keepGlobalTransform: The keep global transform value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

_EnterTree()

Kind: Method

public System.Void _EnterTree()()

Summary

Called when this node enters a scene tree.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

_ExitTree()

Kind: Method

public System.Void _ExitTree()()

Summary

Called when this node exits a scene tree.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

_Input(Electron2D.InputEvent)

Kind: Method

public System.Void _Input(Electron2D.InputEvent)(Electron2D.InputEvent inputEvent)

Summary

Called when an input event is delivered to this node.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • inputEvent: The input event value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

_PhysicsProcess(System.Double)

Kind: Method

public System.Void _PhysicsProcess(System.Double)(System.Double delta)

Summary

Called during a fixed physics update.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • delta: The elapsed time in seconds.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

_Process(System.Double)

Kind: Method

public System.Void _Process(System.Double)(System.Double delta)

Summary

Called during an idle frame update.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • delta: The elapsed time in seconds.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

_Ready()

Kind: Method

public System.Void _Ready()()

Summary

Called when this node and its children are ready.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node

Clone this wiki locally