question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Awaiting stops working in Editor after loading scene

See original GitHub issue

I believe this is because of the commit here: https://github.com/muckSponge/UnityAsync/commit/e01e2dc39084e4b5181dcef98344291ea3d5ddc3#diff-86c1eb8e1ae625825c97d335eaea9712

if(!Application.isEditor) // DontDestroyOnLoad can not be called in editor mode DontDestroyOnLoad(Instance);

When loading a new scene, the AsyncManager instance is destroyed preventing any Await calls to complete.

DontDestroyOnLoad does work in Editor. So not following the reasoning behind the change.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
muckSpongecommented, Sep 30, 2020

Actually, decided to fix this myself in cfd37ae62254fe35c893a9f73dcffe1284c453e2.

0reactions
muckSpongecommented, Sep 30, 2020

Yeah go ahead with the pull request. If DontDestroyOnLoad works in the editor, that condition can be removed. I probably just didn’t do thorough enough testing when I approved it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to async loading scene in editor?
When there are many objects in the scene the loading speed is slow, so I will try to explain why I load while...
Read more >
Unity c# SceneManager LoadScene not running from Task. ...
What happens: console prints "Test" but scene is not starting. I also tested to load another scene but nothing happens. Does anyone know...
Read more >
unity - Scenes do not stop showing "(is loading)"
When allowSceneActivation is set to false, Unity stops progress at 0.9, and maintains isDone at false. When AsyncOperation.
Read more >
How do I load scene content but not show it until later?
You're guessing that this would be done by reaching "through" the AsyncOperation to get the scene-in-waiting, but this guess might be wrong.
Read more >
How to easily find & load scenes in the Unity Editor ... - YouTube
Github: https://github.com/markv12/AutomaticSceneDropdownDemo Checking out a technique for quickly loading scenes in the editor so you don't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found