So, I’ve been trying to reduce build size. As my project is pure ECS. So I started an empty project to find out how much packages would impact the projects build size.
But no matter what I could not reduce the size below around 42mb. Disabling all the default unity engine packages does not actually reduce the unity engine DLL file as it would be expected, but it does say disable and not remove. But… I’m not using those features.
Also I noticed URP relies on physics but doesn’t have that dependency. And Hybrid relies on Particle System (since a few months ago) but also doesn’t link it properly. Also the input package relies on alot of default packages but doesn’t have them as dependents. Overall with the first two, uses Asset Bundle, IMGUI, JSONSerialize, Particle System, Physics, UI, UIElements and UIElements Native. I’m not sure why it would need most of these.
The zip file is around 14.7mb without the ECS packages (42mb unzipped). With Hybrid and URP it comes to 17.8mb zipped and 47.5mb unzipped.
Is tiny the only solution for a pure dots project? I think most of the bloat here is the original unity engine with all those features I won’t be using. Can we use git and fork the repositories and cut anything out that we won’t use? I wonder if anyone has done this. Maybe Tiny is the solution after all but it is still experimental for Linux.
30 MB is for UnityPlayer.so from my last build with a project of similar size (most assets are generated procedurally at runtime). So yes it is going to be hard to get the build smaller unless you use Project Tiny (which is a lot smaller). Of course, 50 MB unzipped isn’t a lot for a desktop game. DOTS paired with the engine offers some powerful features you won’t find in Tiny, and DOTS is leveraging a good portion of that 30 MB to realize those features.
The most powerful feature I am using is Burst atm! and the Graphics class from unity engine! I’ve even read from unity engineers that a lot of it is fluff (on the tiny forums), I am generally curious how much of the 30-31MB is being used in a DOTS project! 50mb is alot then some of the games on steam, maybe they are from PICO or rpg maker. I also believe burst compilation stuff is kept outside that unity dll. APK is around 20, but the feature to download instantly on the play store won’t be available to unity. (needs to be less then 10Mb). I normally would use a lot of the unity engine tools, but for my current project I am not.
I believe for bigger projects to, the ability to play instantly, and stream in assets, will be a powerful tool for developers. I imagine taking some old games, and throwing them up on new stores, like social media games etc. So having that process will be good for indie devs reusing old games.
I don’t know how much of the engine DOTS uses, but I know it is not zero. Meshes, Materials, their asset management and serialization functionality, the renderer (which is bigger than Tiny because it has a lot more features), audio and input (same comment as the renderer) and the game loop logic all matter.
Is 30 MB larger than it needs to be? Of course. But can it be made small enough to be worth the effort? That I’m doubtful of.
Yeah ^ I cant use Tiny until it’s not experimental on Linux though ^ I agree with all that, i don’t use alot of the features though. (Even on the job I believe we used asset store things for AI and other features).
I only really use Graphics.Draw at this point, Audio Source to play generated clips and ECS. I’ve also seen alot of 2D games on steam only take up less then 20mb to download. So I think unity engine is definitely more bloated then others. Tiny will definitely fill the gap for this. Unity does have a lot of amazing engineers. But It’d just be nice if tiny’s philosophy of modularity would be used in their main engine too.