Skip to content

SignalAttribute

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

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

Field Value
Full name Electron2D.SignalAttribute
Namespace Electron2D
Kind class
Category Scripting Metadata

Overview

Marks a script delegate declaration as a signal that can be registered on an Electron2D object and emitted through Electron2D.Object.EmitSignal(System.String,System.Object[]).

Syntax

public sealed class Electron2D.SignalAttribute : System.Attribute

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: SignalAttribute / [Signal]

Marker attribute for script delegates backed by explicit signal metadata and the existing Connect()/EmitSignal() API.

Remarks

Use this attribute on delegate declarations inside C# script classes. The delegate describes the signal payload for tooling and generated metadata. Runtime emission still uses the existing signal API: Electron2D.Object.AddUserSignal(System.String), Electron2D.Object.Connect(System.String,Electron2D.Callable,Electron2D.ConnectFlags) and Electron2D.Object.EmitSignal(System.String,System.Object[]).

Electron2D 0.1.0 Preview does not expose .NET events as script signals and does not scan assemblies for signal delegates at runtime. Signal metadata is supplied explicitly for AOT-safe registration.

The attribute is immutable and is safe to read from any thread.

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 attribute is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.ExportAttribute
  • Electron2D.ToolAttribute

Members

Member Kind Summary
Electron2D.SignalAttribute() Constructor Initializes a new instance of the SignalAttribute type.

Member Details

Electron2D.SignalAttribute()

Kind: Constructor

public Electron2D.SignalAttribute()

Summary

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

Clone this wiki locally