master
neuecc 2020-06-26 17:57:27 +09:00
parent 68cdda086a
commit f0d2ee2beb
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ PlayerLoopHelper.Initialize(ref playerLoop);
async void vs async UniTaskVoid async void vs async UniTaskVoid
--- ---
`async void` is a standard C# taks system so does not run on UniTask systems. It is better not to use. `async UniTaskVoid` is a lightweight version of `async UniTask` because it does not have awaitable completion and report error immediately to `UniTaskScheduler.UnobservedTaskException`. If you don't require to await it(fire and forget), use `UniTaskVoid` is better. Unfortunately to dismiss warning, require to using with `Forget()`. `async void` is a standard C# task system so does not run on UniTask systems. It is better not to use. `async UniTaskVoid` is a lightweight version of `async UniTask` because it does not have awaitable completion and report error immediately to `UniTaskScheduler.UnobservedTaskException`. If you don't require to await it(fire and forget), use `UniTaskVoid` is better. Unfortunately to dismiss warning, require to using with `Forget()`.
```csharp ```csharp
public async UniTaskVoid FireAndForgetMethod() public async UniTaskVoid FireAndForgetMethod()