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

[Unity] Bug: await $promise还未执行完停止了编辑器。时间到的时候控制台报错JsEnv has been disposed #1975

Open
3 tasks done
wardehuang opened this issue Jan 25, 2025 · 0 comments
Assignees
Labels
bug Something isn't working Unity

Comments

@wardehuang
Copy link

前置阅读 | Pre-reading

Puer的版本 | Puer Version

2.1.1、2.1.2

Unity的版本 | Unity Version

2022.3.55f1

发生在哪个平台 | Platform

Editor(win)

错误信息 | Error Message

Exception: JsEnv has been disposed, stacktrace: at puerts\csharp.mjs:126:27
at taskToPromise(puerts\csharp.mjs:125:12)
at asyncCall(Quickstart.mjs:89:17)

问题重现 | Bug reproduce

  1. 下载官方的demo
  2. 替换zip包中05_Typescript的文件。SomeClasses.cs、Resources\QuickStart.mjs
  3. 打开代码查看SomeClasses.cs,增加如下函数

Image

  1. 打开代码查看QuickStart.mjs,增加如下逻辑

Image

  1. 直接不作改动运行,并在出现[file length is]日志后,3秒内停止运行,控制台报错

Image

05_Typescript.zip

@wardehuang wardehuang added bug Something isn't working Unity labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Unity
Projects
None yet
Development

No branches or pull requests

2 participants