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

Build weight is heavier than expected. #89

Closed
rielicat opened this issue Oct 26, 2023 · 5 comments
Closed

Build weight is heavier than expected. #89

rielicat opened this issue Oct 26, 2023 · 5 comments

Comments

@rielicat
Copy link

rielicat commented Oct 26, 2023

Hello @JohannesDeml !

I'm cloning your repo and using the 2023.1-urp branch to create a build. I'm upgrading to 2023.1.18f1 and upgrading packages to their latest version.

I'm changing the Build Target to WebGL and using the webgl2 build tool that is added to the toolbar. Literally changing nothing to the project other than upgrading stuff.

But the result is way heavier that what you have. You can see the reference to the data.br and wasm.br files.

What am I doing wrong?

I'm on MacOS Monterey 12.6 and using the Intel version of unity editor

image image
@JohannesDeml
Copy link
Owner

JohannesDeml commented Oct 26, 2023

Hi @pyscriptbug!

URP is ~3 MB larger than a builtin renderpipeline build. Sadly the automated URP builds for 2023.1 are failing for me (see game-ci/docker#214), therefore I don't have any numbers of the current build size for that version. If you have a look at all the live builds, you can see the size for webgl1, webgl2 with and without urp to get an idea.

What comes closest to your build is 2022.3.10f1-urp-webgl2 (5.81 MB) - With 5.81 MB this is still quite a bit smaller than your build, but I could imagine that this comes from new features in the URP package. I will do a local build to see at which size I'm ending up, but I could imagine that you're doing nothing wrong and this is just the size of 2023.1 with urp.

@rielicat
Copy link
Author

Thank you for your response @JohannesDeml!

That makes a lot of sense, I was comparing my build size to your built-in example. Even if it's a little bit heavier than the one you've provided it might be because of some new features added to URP in the latest version.

@JohannesDeml
Copy link
Owner

For completeness, here is the local build I made: 2023.1.18f1-webgl2-manualBuild (6.22 MB)

This matches your build size quite well :)
image

@JohannesDeml
Copy link
Owner

Oh, I forgot to mention. You can also build for min size (I added a menu command for that in the project)
image

Then the build ends up being almost one MB smaller: 2023.1.18f1-minsize-webgl1-manualBuild (5.37 MB)

@rielicat
Copy link
Author

Awesome, thank you!

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

2 participants