Quick answer: Don’t block on .Result in Godot context. await through, use ToSignal for engine events, ConfigureAwait(false) for pure async work.
Loading config in _Ready with data = LoadAsync().Result. Editor freezes. Godot context can’t resume the continuation while you’re blocking it.
The Fix
public override async void _Ready() {
Data = await LoadAsync().ConfigureAwait(false);
// returned to non-Godot context
await CallDeferredAsync(MethodName.ApplyData);
}
// Wait on a signal
public async Task WaitFire() {
await ToSignal(timer, Timer.SignalName.Timeout);
Fire();
}
ConfigureAwait(false) tells the runtime not to bother resuming on Godot’s context. ToSignal is the idiomatic bridge for engine events.
Verifying
Editor responsive during load. Console shows continuation completing. No deadlock.
“Don’t .Result. Await through. ToSignal for engine.”
Related Issues
For C# GD.Print, see GD.Print. For C# signal emit, see signal emit.
Await through. No block. No deadlock.