-
Notifications
You must be signed in to change notification settings - Fork 67
Speed up preloads using unity-scene-repacker
#157
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
Open
jakobhellermann
wants to merge
20
commits into
hk-modding:master
Choose a base branch
from
jakobhellermann:repack-preloads
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4f9ff05
build: copy files top <CopyDir> if set
jakobhellermann 6052319
preloader: implement optimization using unity-scene-repacker
jakobhellermann d03305f
preloader: support preloading using non-scene asset bundles
jakobhellermann e2b0714
fix progress bar not being able to catch up
jakobhellermann 3908ac2
refactor: move ProgressBar to separate file
jakobhellermann 91f1840
build: remove SolutionDir to support `dotnet build Assembly-CSharp ...`
jakobhellermann df17ebd
disable <CopyDir> by default
jakobhellermann d9dc78c
actions: build assembly-csharp with specified RID
jakobhellermann cfa8860
preloader: log total duration for preloading
jakobhellermann b9bb6ba
Merge branch 'master' into repack-preloads
jakobhellermann 8ef02d0
switch `PreloadMode` setting to enum
jakobhellermann 24db6bd
fall back to `RepackScene` when scene hooks are present
jakobhellermann f6e258f
set default preload mode to `RepackAssets`
jakobhellermann 08bc9d4
don't use new c# languge features
jakobhellermann afd2498
fix typo
jakobhellermann 0ed58bf
refactor: make preloading method names clearer
jakobhellermann cc80fec
replace string with `nameof()` reference
jakobhellermann b57bdf8
pass embedded dump of monobehaviour typetrees to unity-scene-repacker
jakobhellermann 6f4808d
rename preload bundles for consistency
jakobhellermann e662c9b
remove leftover python script for timing analysis
jakobhellermann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When packing the scenes into an assetbundle, we need to have information about the layout of the serialized data of the game's MonoBehaviours, so that we can patch up some layout changes.
Here I'm just bundling them into the dll (they're 200KiB big).
But the question is, does the modding API support earlier game versions as well?
In that case, this would have to be done differently:
unityscenerepacker.dll
using TypeTreeGeneratorAPI, but that would be an extra18MiB
dll we have to distributeUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only support the current version really. there are builds for some earlier patches but they don't really need these types of new features (and the API itself is wildly different)