Remove DLLs from build
I'm building a WebGL project and I can't seem to get it under 7 MB despite minimal assets.
Currently, dll's are taking about 50% of he build. I've tried everything I can think of to reduce dependencies. "System." doesn't appear anywhere in my project except "using System.Collections", "using System.Collections.Generic", "System.IEquatable", and "System.BitConverter.ToInt64". I've cleared every cache I could find and still the following show up as dependencies according to the editor log:
Dependency assembly - Mono.Security.dll Dependency assembly - System.Core.dll Dependency assembly - System.dll Dependency assembly - mscorlib.dll Dependency assembly - UnityEngine.UI.dll Dependency assembly - UnityEngine.Networking.dll Dependency assembly - Assembly-CSharp.dll
Also, MonoDevelop includes references to: System System.Core System.Xml System.Xml.Linq UnityEditor UnityEngine UnityEngine.Networking UnityEngine.UI
I can remove references to all, but UnityEngine and UnityEngine.UI and it still builds properly. My project has included references to those dlls in the past, but I've since removed them.
Answer by TangledRealityStudios · Jul 10, 2016 at 07:01 AM
I should have done this from the beginning, but it turns out that an empty WebGL project includes all the same DLLs and and takes 3 MB all built. I'll have to look at a new way to reduce my memory pull.
Your answer
Follow this Question
Related Questions
CPU Overheat when building in WebGL 0 Answers
Build WEBGL Error in Unity 2019.3.3f1 1 Answer
Game works better as Windows Application than in WebGL. Why? 0 Answers
Cannot load "lib_burst_0_0" on Android builds 2 Answers
unity not removing unsed objects 0 Answers