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

Investigate Unity initialization when domain reloading is turned off #2898

Closed
nirinchev opened this issue Mar 31, 2022 · 7 comments · Fixed by #3145
Closed

Investigate Unity initialization when domain reloading is turned off #2898

nirinchev opened this issue Mar 31, 2022 · 7 comments · Fixed by #3145
Assignees

Comments

@nirinchev
Copy link
Member

A user reported that when they turn off domain reloading in Project Settings->Editor->Enter Play Mode Settings, the second time they enter play mode, the SDK will hang when attempting to login a user. We should figure out what's causing this and guard against it. See this forum post for more details.

@moritz-mg
Copy link

Any updates or findings related to this yet? :)
Our project is growing fast and domain reload times are already taxing our iteration speed. We'd love to turn them off.

@nirinchev
Copy link
Member Author

I'm sorry - we haven't had time to look at it yet. We've had to reshuffle some resources and a significant portion of the .NET team is helping other teams currently. This ticket is top of our backlog though, so as soon as we're done with time-sensitive feature work, we'll look at it.

@ebbe-brandstrup
Copy link

Happy New Year ;-)

This issue still hasn't been resolved and it really does make a huge difference when working on a Unity project (iteration speed).

It would be very much appreciated if you could provide an update on when/if this can be prioritised, thanks!

@nirinchev
Copy link
Member Author

I believe I have a fix for this - it appears the issue was that on domain unload/application exit, we detach the hooks into native to allow Unity to exit cleanly (otherwise native async operations may hang up the editor/game on exit). But because we were only attaching these hooks in static constructors, those weren't getting called when the app is restarted without a domain reload. I've followed the Unity docs on how to handle that case and it seems to be working correctly in the repro I cooked up. Once the CI build completes, I can try and give you the compiled package to test on your project.

@nirinchev nirinchev self-assigned this Jan 4, 2023
@nirinchev
Copy link
Member Author

Here's a link for the updated package: https://drive.google.com/file/d/1D0tOOjVQ8xmNDTl5FjnGxgXzjB53Krne/view?usp=share_link. If you get a chance to test it out and confirm it resolves the issue, that would be amazing.

@ebbe-brandstrup
Copy link

@nirinchev that sounds great! Thank you!

I will be happy to test the updated package later today. I’ll reply again once I’ve been able to test.

@ebbe-brandstrup
Copy link

I've just installed the pre-release build and disabled domain reloading in my Unity project - and everything is good! It makes such a huge difference in the turn around time while developing. Thanks again @nirinchev!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants