Skip to content

C#: Generate ToSignal{SignalName} awaiter method #15201

Description

@Sultanov-vm

Problem or limitation

Currently it takes more code to await signal in C# compared to GDScript

GDScript:
await button.pressed

C#:
await ToSignal(button, Button.SignalName.Pressed);

using autocompletion it takes 2 times more completions on C# and looks noisier

Proposed improvement

Generate ToSignal{SignalName}() Methods similar to godotengine/godot#68233 to reach a syntax like:

C#:
await button.ToSignalPressed();

Proposal review

  • Yes, this proposal is highly specific and actionable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions