Skip to content
Eduard Gushchin edited this page Jul 1, 2026 · 5 revisions

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

Field Value
Full name Electron2D.Area2D
Namespace Electron2D
Kind class
Category Physics

Overview

Provides an Electron2D 2D area node for overlap and influence queries.

Syntax

public class Electron2D.Area2D : Electron2D.CollisionObject2D

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Area2D

RID lifecycle, monitoring flags, priority, transform sync, AABB overlap snapshots, body_entered/body_exited and area_entered/area_exited signals.

Remarks

The 0.1.0 Preview baseline creates and frees an area RID, stores area properties and synchronizes transforms. Overlap signals and query results are added by later physics tasks.

Thread Safety

This type is not synchronized. Create and mutate nodes on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
Monitorable Property Gets or sets whether other areas can monitor this area.
Monitoring Property Gets or sets whether this area monitors overlapping bodies and areas.
Priority Property Gets or sets the processing priority for this area.
Electron2D.Area2D() Constructor Creates an area and registers its Electron2D built-in overlap signals.
GetOverlappingAreas() Method Returns a snapshot of areas currently overlapping this area.
GetOverlappingBodies() Method Returns a snapshot of physics bodies currently overlapping this area.
HasOverlappingAreas() Method Checks whether this area currently overlaps at least one other area.
HasOverlappingBodies() Method Checks whether this area currently overlaps at least one body.
OverlapsArea(Electron2D.Area2D) Method Checks whether a specific area currently overlaps this area.
OverlapsBody(Electron2D.Node2D) Method Checks whether a specific body currently overlaps this area.

Member Details

Monitorable

Kind: Property

public System.Boolean Monitorable { get; set; }

Summary

Gets or sets whether other areas can monitor this area.

Remarks

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

Value

The current monitorable value.

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

Monitoring

Kind: Property

public System.Boolean Monitoring { get; set; }

Summary

Gets or sets whether this area monitors overlapping bodies and areas.

Remarks

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

Value

The current monitoring value.

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

Priority

Kind: Property

public System.Int32 Priority { get; set; }

Summary

Gets or sets the processing priority for this area.

Remarks

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

Value

The current priority value.

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

Electron2D.Area2D()

Kind: Constructor

public Electron2D.Area2D()

Summary

Creates an area and registers its Electron2D built-in overlap signals.

Remarks

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

Thread Safety

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

Since

This constructor is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Area2D

GetOverlappingAreas()

Kind: Method

public Electron2D.Area2D[] GetOverlappingAreas()()

Summary

Returns a snapshot of areas currently overlapping this area.

Remarks

Areas with Electron2D.Area2D.Monitorable set to false are not included in another area's snapshot.

Returns

A new array containing valid overlapping areas ordered by instance id.

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

GetOverlappingBodies()

Kind: Method

public Electron2D.Node2D[] GetOverlappingBodies()()

Summary

Returns a snapshot of physics bodies currently overlapping this area.

Remarks

The list updates during Electron2D.SceneTree physics frames. Nodes that were freed after a deferred deletion are removed before the snapshot is returned.

Returns

A new array containing valid overlapping body nodes ordered by instance id.

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

HasOverlappingAreas()

Kind: Method

public System.Boolean HasOverlappingAreas()()

Summary

Checks whether this area currently overlaps at least one other area.

Remarks

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

Returns

true when at least one valid area overlaps this area; otherwise, false.

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

HasOverlappingBodies()

Kind: Method

public System.Boolean HasOverlappingBodies()()

Summary

Checks whether this area currently overlaps at least one body.

Remarks

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

Returns

true when at least one valid body overlaps this area; otherwise, false.

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

OverlapsArea(Electron2D.Area2D)

Kind: Method

public System.Boolean OverlapsArea(Electron2D.Area2D)(Electron2D.Area2D area)

Summary

Checks whether a specific area currently overlaps this area.

Remarks

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

Parameters

  • area: The area node to check.

Returns

true when area is in the current area overlap list.

Exceptions

  • System.ArgumentNullException: Thrown when area is null.

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

OverlapsBody(Electron2D.Node2D)

Kind: Method

public System.Boolean OverlapsBody(Electron2D.Node2D)(Electron2D.Node2D body)

Summary

Checks whether a specific body currently overlaps this area.

Remarks

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

Parameters

  • body: The body node to check.

Returns

true when body is in the current body overlap list.

Exceptions

  • System.ArgumentNullException: Thrown when body is null.

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

Clone this wiki locally