Skip to content

Async mod loading during loading screen #607

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

Merged
merged 13 commits into from
Jul 17, 2025

Conversation

tinyhoot
Copy link
Contributor

@tinyhoot tinyhoot commented Jun 2, 2025

Changes made in this pull request

  • Provide a way for mods to insert themselves into the loading screen. Mods can register tasks which must complete before the game can continue loading, preventing race conditions caused by excessive asset loading when many mods are present.
  • Provide a status display during the loading screen so that users know what is currently happening. Displays the current game loading stage as well as how many mod tasks have been processed, along with how many remain.
  • Have task execution windows early, "medium", and late into the loading process.
  • Migrate existing Nautilus systems to use the loading screen tasks. Notably SaveDataCache.

Breaking changes

  • Ideally none, the existing API should persist with changes only happening under the hood.
  • Mods which override SaveDataCache's sync Load or Save methods will likely break silently, as the SaveDataHandler now calls their async counterparts.
  • SaveDataCaches use this new system, which means their timing is ever so slightly different, which may trip up mods that rely on extremely precise execution timings.

@tinyhoot tinyhoot force-pushed the async-mod-loading branch from 0a67834 to 2875884 Compare June 28, 2025 21:57
@tinyhoot tinyhoot marked this pull request as ready for review June 28, 2025 21:59
@LeeTwentyThree LeeTwentyThree merged commit db1e8bd into SubnauticaModding:master Jul 17, 2025
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 17, 2025
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 this pull request may close these issues.

2 participants