Assets - APK

Hello,

I have just about completed a 2D game in Unity and about to start the process of final testing etc. When unity creates a APK does it look at all the assets and completely includes all assets in my assets folder or does it look at the ones that are only used throughout the game?

Thanks

In my understanding what happens when unity packages an APK file, is that it takes all the scenes in your build settings, grabs all the assets that appear in them, and it also takes assets in the resources folder (this may be phased out soon though).

Every single script is included (excluding editor scripts) and all the android plug-ins as well. But I think only the models, textures, sounds, and other normal non-code assets are selectively added unless they exist in a special folder like resources.

Thank you MD_Reptile,

So I guess if unity includes all assets in the resources folder, then It’s best practice to delete what the game is not using to create a smaller APK?

1 Like

Yes, if there are tons of unused assets in the resources folder, it will make the file larger without a purpose, and the reason being that unity doesn’t know for sure which assets are going to be potentially used in the game at a given time and just includes the entire set, so the responsibility to keep the resources tidy falls on the developer.

Great stuff. Thank you MD!

1 Like

No problem, good luck!