Skip to content

Add documentation on how to await a signal in C# #10831

Open
@Shadowblitz16

Description

@Shadowblitz16

Describe the project you are working on

A voxel game

Describe the problem or limitation you are having in your project

I need to await for a frame everytime a chunk generates

Describe the feature / enhancement and how it helps to overcome the problem or limitation

We need documentation on how to await signals in godot callbacks in C#

We can't just await in any method in C# due to C# methods needing to be a async Task.
This means we can't do things like await in ToolButton exports or an godot callbacks like _Process or _Ready

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Just give us examples on work around in the godot documentation.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It's a core feature in godot and gdscript, C# should have some way to do it.

Is there a reason why this should be core and not an add-on in the asset library?

There doesn't seem be anyone who has solves this issue.
I have seen posts that describe making the method a async void but that's not awaitable you need the return type to be a Task or one of it's equivilents

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions