Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGL not work. #15

Closed
Bian-Sh opened this issue Apr 12, 2024 · 1 comment
Closed

WebGL not work. #15

Bian-Sh opened this issue Apr 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Bian-Sh
Copy link

Bian-Sh commented Apr 12, 2024

Bug Report

Overview

我尝试在逻辑中使用 Task.Delay ,但是打包成 webgl 后,Task.Delay 没有效果。
我测试了 2023.2.14f1c1、2022.3.17f1c1、2020.3.28f1c1 均不行
但是,我使用了 WebGLThreadingPatcher却是完全正常。

I tried using Task.Delay in Unity but it didn't work when built as WebGL. I tested it on versions 2023.2.14f1c1, 2022.3.17f1c1, and 2020.3.28f1c1 with no success. However, when I used WebGLThreadingPatcher, it worked perfectly fine.

by the way,when i use 2020.3.28f1c1 , i found this error:"Packages\com.utilities.async\Runtime\Async\AwaiterExtensions.cs(129,13): error CS0518: Predefined type 'System.IAsyncDisposable' is not defined or imported" ,Perhaps your language syntax is too modern.

To Reproduce

Steps to reproduce the behavior:

  1. download the project blow
  2. change platform to webgl in buildsettings
  3. build and play
  4. See and check webgl interaction behaviour

Expected behavior

Task.Delay should work well.

Additional context

WebGL Task.zip

@Bian-Sh Bian-Sh added the bug Something isn't working label Apr 12, 2024
@StephenHodgson
Copy link
Member

Makes sense. Webgl is a workaround for this module. Use await new wait for seconds instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants