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

Awaiting stops working in Editor after loading scene #13

Open
cfoulston opened this issue Mar 18, 2020 · 6 comments
Open

Awaiting stops working in Editor after loading scene #13

cfoulston opened this issue Mar 18, 2020 · 6 comments

Comments

@cfoulston
Copy link

cfoulston commented Mar 18, 2020

I believe this is because of the commit here:
e01e2dc#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.

@drallcom3
Copy link

Same here. UnityAsync fails heavily after loading a scene. Removing the IF makes it work fine.
Mainly the frame counter becomes unusable.

@aylanonsense
Copy link

Same! Resolved by commenting out the conditional

@tim-pp
Copy link

tim-pp commented Sep 19, 2020

+1, I wonder what the reason is behind that line.

@prodigga
Copy link

Pinging @muckSponge, just because some information would be useful. I am willing to put in a pull request to fix this but it would be good to understand why this code and the comment exists in the first place.

@muckSponge
Copy link
Owner

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.

@muckSponge
Copy link
Owner

Actually, decided to fix this myself in cfd37ae.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants