How to upload your unity project online in 2024, Source Code Size Optimization technique

In this tutorial I will show you how you can upload your unity project online with least size as possible.

Unity projects have folder called 'Library', It is automatically generated by Unity and contains various intermediate files and data that the Unity Editor uses during the development process.

If you delete this folder size of project automatically decrease, and when opened at receiver end they can download the 'deleted unity packages' automatically, so few minutes of waiting at there end, and they will have working copy of your project.

Once you open a project without library folder it will try to install packages mentioned in 'Packages/manifest.json', once downloaded and installed your new Library folder will be created at user end, and since these packages used are from unity library, so can be downloaded most probably anytime.
This is what package downloading at runtime looks like
\

Space saved in our test case:

Our initial project size was 1.75 GB (estimate) and it went to 261MB After deletion of Library folder.

Making it ideal to share on Github, Google Drive, GitLab, Bitbucket, Git, SVN (Subversion), Azure DevOps and other websites.

Initial Size = 1.75 GB
Final Size = 261 MB

First, we need to convert both sizes to the same unit. Let's convert 1.75 GB to MB:
1.75 GB = 1.75 * 1024 MB (since 1 GB = 1024 MB)
1.75 GB ≈ 1792 MB

Now, we can calculate the percentage of space saved:

Percentage Space Saved = [(1792 MB - 261 MB) / 1792 MB] * 100
Percentage Space Saved = (1531 MB / 1792 MB) * 100
Percentage Space Saved ≈ 85.38%

Conclusion:


By following this tutorial, Unity developers can optimize their project sizes, making them more manageable and easily shareable across different collaborative and version control platforms. Efficient size reduction techniques like this contribute to smoother project management and streamlined teamwork in the world of Unity development.

For any questions regarding this tutorial don't forget to ask us at [email protected] or ask in comment section below.

Leave a Reply

Your email address will not be published. Required fields are marked *