Skip to content

SceneTree

Eduard Gushchin edited this page Jun 21, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.SceneTree
Namespace Electron2D
Kind class
Category Scene Tree

Overview

Represents the scene tree type.

Syntax

public class Electron2D.SceneTree : 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
CurrentScene Property Gets or sets the current scene value.
DebugCollisionsHint Property Gets or sets whether collision shapes should be exposed to debug visualization.
Root Property Gets the root value.
Electron2D.SceneTree() Constructor Initializes a new instance of the SceneTree type.
CallGroup(System.String, System.String, System.Object[]) Method Executes the call group operation.
ChangeSceneToPacked(Electron2D.PackedScene) Method Executes the change scene to packed operation.
CreateTween() Method Creates a tween processed by this scene tree.
GetFirstNodeInGroup(System.String) Method Gets the first node in group value.
GetNodeCountInGroup(System.String) Method Gets the node count in group value.
GetNodesInGroup(System.String) Method Gets the nodes in group value.
HasGroup(System.String) Method Checks whether group is available.

Member Details

CurrentScene

Kind: Property

public Electron2D.Node CurrentScene { get; }

Summary

Gets or sets the current scene value.

Remarks

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

Value

The current current scene 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.SceneTree

DebugCollisionsHint

Kind: Property

public System.Boolean DebugCollisionsHint { get; set; }

Summary

Gets or sets whether collision shapes should be exposed to debug visualization.

Remarks

This property does not draw anything by itself. It enables the internal managed snapshot used by the editor viewport and automated diagnostics.

The snapshot intentionally contains scene nodes and geometry data only; it does not expose backend handles or native pointers.

Value

true to enable internal collision shape snapshots for editor and diagnostics tools; otherwise, false.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.CollisionShape2D.DebugColor

Root

Kind: Property

public Electron2D.Node Root { get; }

Summary

Gets the root value.

Remarks

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

Value

The current root 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.SceneTree

Electron2D.SceneTree()

Kind: Constructor

public Electron2D.SceneTree()

Summary

Initializes a new instance of the SceneTree 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.SceneTree

CallGroup(System.String, System.String, System.Object[])

Kind: Method

public System.Void CallGroup(System.String, System.String, System.Object[])(System.String group, System.String method, System.Object[] args)

Summary

Executes the call group operation.

Remarks

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

Parameters

  • group: The group value.
  • method: The method value.
  • args: The args 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.SceneTree

ChangeSceneToPacked(Electron2D.PackedScene)

Kind: Method

public Electron2D.Error ChangeSceneToPacked(Electron2D.PackedScene)(Electron2D.PackedScene packedScene)

Summary

Executes the change scene to packed operation.

Remarks

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

Parameters

  • packedScene: The packed scene value.

Returns

The result of the operation.

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.SceneTree

CreateTween()

Kind: Method

public Electron2D.Tween CreateTween()()

Summary

Creates a tween processed by this scene tree.

Remarks

The returned tween is advanced during Electron2D.SceneTree.ProcessFrame(System.Double) after node process callbacks and before draw callbacks. Add tweeners to it with Electron2D.Tween.TweenProperty(Electron2D.Object,Electron2D.NodePath,Electron2D.Variant,System.Double), Electron2D.Tween.TweenInterval(System.Double) or Electron2D.Tween.TweenCallback(Electron2D.Callable).

A tween created this way remains valid until it completes, Electron2D.Tween.Kill is called, or the tween is otherwise removed from the scene tree processing list.

Returns

A valid Electron2D.Tween instance that starts in the running state.

Thread Safety

This method is not synchronized. Call it on the main scene thread.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Node.CreateTween
  • Electron2D.Tween

GetFirstNodeInGroup(System.String)

Kind: Method

public Electron2D.Node GetFirstNodeInGroup(System.String)(System.String group)

Summary

Gets the first node in group value.

Remarks

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

Parameters

  • group: The group value.

Returns

The current first node in 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.SceneTree

GetNodeCountInGroup(System.String)

Kind: Method

public System.Int32 GetNodeCountInGroup(System.String)(System.String group)

Summary

Gets the node count in group value.

Remarks

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

Parameters

  • group: The group value.

Returns

The current node count in 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.SceneTree

GetNodesInGroup(System.String)

Kind: Method

public Electron2D.Node[] GetNodesInGroup(System.String)(System.String group)

Summary

Gets the nodes in group value.

Remarks

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

Parameters

  • group: The group value.

Returns

The current nodes in 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.SceneTree

HasGroup(System.String)

Kind: Method

public System.Boolean HasGroup(System.String)(System.String name)

Summary

Checks whether group is available.

Remarks

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

Parameters

  • name: The name 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.SceneTree

Clone this wiki locally