making a project as small as possible

I’d like to occasionally include a complete Unity project with a blog post, does anyone have any tips for minimising the size of a project, assume I’m only using geometric objects included in the editor like cubes and spheres, and only tiny textures if any at all…

What’s the best way to identify what packages I can ditch from the project ?

Is there any other resources that can be ditched assuming I’m just using simple geom’s and mainly focusing on c# behaviours ?

TIA

Please chekout Unity Project Tiny.

3 Likes

Instead of a project, it might make more sense to export a Unity package file with only your own content.

For a smaller file, don’t include any packages from the package manager. Whoever downloads can create their own project and the common packages will already be there (or they can just install the packages on their own).

1 Like

@Antypodish do you have a url for this ?
@kdgalla good idea, I’ll look at doing this instead… thanks

Code stripping set as high as possible in player settings
Crunch textures + limit their resolution to lowest possible for each texture
If you do not need mipmaps, disable them on textures where not necessary
Remove any 3rd party code and plugins that are not 100% necessary
Remove any (or all) packages that are not 100% necessary

The above alone will drastically reduce the size of a project.

For example, our WebGL build went from 400mb to 16mb using just the above steps, with no visible loss of quality in any way.

This also helped reduce memory consumption. Good luck! :slight_smile:

Do those things change the project source size? I thought they’d only change the build size and cached resources (ie: the Library folder).

If uploading projects make sure to delete the Library folder, as well as obj and Temp if I remember correctly. They’re all derived cache data, as opposed to source, and are not necessary when distributing your source.

Project Tiny isn’t what you want. It’s designed around smaller builds and low power consumption, not smaller distributed project sizes. It also requires basically changing the entire way your project works if you want to use it.

https://forum.unity.com/forums/project-tiny.151/

If it’s for distribution, do a git repo with just the assets and project settings folder. Only include assets you’ve created.

Most of this will be just straight plain text. Projects without art and sound are typically tiny.

I am not sure the OP asked for that? I didnt see them specify so assumed they mean build but if not, then no this advice I gave is irrelevant.

1 Like

They’re talking about including a project with their blog post.

1 Like

Right you are, I completely missed that despite re-reading the OPs post a few times :roll_eyes:

Despite OP saying “project”, I am still in impression, OP means build size rather than project size itself.

https://bedroomcoders.co.uk

They run a coding blog.

1 Like

In such case, OP can simply use online repositories, like github for example. With numerous advantages.
No need for uploading projects to own website, other than linking references to repo.

The problem wasn’t about hosting a large file, it was about identifying what would best be removed from the project for sharing, which ultimately amounts to using a package as explained. For the samples I read on the blog, that makes a decent amount of sense and solves any potential dependency issues save for packages.