I’m doing some tests to figure out how small a package I can get to as a starting point for a web-based project. One of the things I’ve run into is a major difference in the generated wasm size for URP vs. the builtin render pipeline - seemingly having nothing to do with URP at all. To do this test I:
- Created a new 3D project with a cube and a camera (no collider on the cube)
- Set engine stripping to high
- Made a Release wasm build (shown below as builtin-renderpipe.wasm.br
- Installed URP (Installing the Universal Render Pipeline into an existing Project | Universal RP | 10.3.2)
- Made another build (urp.wasm.br below)
1576198 Feb 23 18:09 builtin-renderpipe.wasm.br
2949806 Feb 23 18:12 urp.wasm.br
Looking at the builds with the BuildReportInspector, I see:
Builtin:
URP:
There are a few differences, but the main thing I notice is the inclusion of the Physics and Physics2D modules, even though they’re not being used.
Has anyone else seen this? Is there something in URP that forces Physics to be included? Is there any way for me to force it to be stripped?
Thanks