godotengine / godotengine/godot-docs

Add documentation on how to await a signal in C#

Open
#10,831 9 comments 0 reactions 0 assignees View on GitHub
area:manual enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

### 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.