Project size extremely large

I’m creating a game for mobile devices, the game is currently in prototype mode and only have exactly 4 sprites. The size of the project was 9MB, and I have the build platform set as IOS. When I attempt to upload to GitHub I found that the size changed to 1.4 GB!!! I started exploring the folder and deleted the “temp” folder and it got reduced to 411MB, still that is an extremely large size for this kind of project and the 4 sprites it includes. What is going on here? and how to get it back to it’s original 9MB size?!!

Firstly, if you’re using Github or some other source control have a read of this (particularly the .gitignore file): unity game engine - How to use Git for Unity3D source control? - Stack Overflow

You’ll find that the size of your whole project folder is quite large as unity generates it’s temp and library files. However, you do not need these. You only need the Assets folder as the rest will be re-generated when Unity opens. Basically, make sure you are not sending library files etc to github.

Now, for iOS (and in fact most platforms) the project size is pretty meaningless. To get the actual size you will need to actually build the project for that platform. For iOS you’ll also need to archive the project within XCode to get a decent idea of the project size (make sure you ignore the DSYM files), but even then, there is some guesswork involved as to the actual final size when uploaded to the App store. However, expect a completely empty project to still take up a few Mb.

EDIT: Forgot to say that you’ll need the ProjectSettings folder and the Assets folder, the rest will be regenerated for you.