I'm developing a game that should have 15-60 levels when all the environments of the levels are the same. I created a scene (level 1) and tried to build it; the total APK is around 38MB which is fine. But When I duplicated this scene to create the other levels and build my game the file size jumps to 148MB which is problematic for me.
Things I tried:
- I optimized meshes, textures, and audio files.
- I tried toggling static batching, SRP batching, GPU Instancing.
Here's some of the editor log of the second build:
Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures 6.2 mb 1.8%
Meshes 3.1 mb 0.9%
Animations 781.3 kb 0.2%
Sounds 0.0 kb 0.0%
Shaders 1.8 mb 0.5%
Other Assets 652.6 kb 0.2%
Levels 323.1 mb 91.6%
Scripts 3.6 mb 1.0%
Included DLLs 13.4 mb 3.8%
File headers 105.1 kb 0.0%
Total User Assets 352.8 mb 100.0%
Complete build size 678.6 mb
Used Assets and files from the Resources folder, sorted by uncompressed size:
2.2 mb 0.3% Assets/Polygon/PolygonSamurai/Models/Characters.fbx
1.2 mb 0.2% Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader
1.0 mb 0.2% Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset
I'm sure I'm doing something wrong but I don't know where the main problem is. Any help is so appreciated.