0
\$\begingroup\$

I'm developing a GoogleVR (formerly Google Cardboard) application and need to import the GoogleVR SDK. While I only expect to use some of the items available in the Unity package, I'd like to import them all at once and save potential headaches later when I can't find something I might need. However I'm worried that including everything in the project may affect the build size, which would be troublesome on a mobile application.

\$\endgroup\$
3
\$\begingroup\$

The unity build process only builds stuff in the included set of scenes that you add through the build configuration dialog ...

https://docs.unity3d.com/Manual/BuildSettings.html

... after selecting your desired set of scenes and the build platform you want to build for you can start the build by clicking the appropriate button.

So in short ...

Adding stuff in to a unity project in itself does not increase the size of a build unless those new package resources are used in your selected set of scenes.

| improve this answer | |
\$\endgroup\$
  • 2
    \$\begingroup\$ You might also want to add that anything in a folder /Resources/ is also included in the build, even if not referenced by a scene. The purpose is to allow assets to be loaded from scripts at runtime. \$\endgroup\$ – Philipp Sep 11 '16 at 19:08
  • \$\begingroup\$ Unused scripts have a tendency to end up in builds too. Because of C#'s reflection features, it's difficult for the compiler to categorically rule that a script is never referenced. They tend to be a small contribution to the file size of a build though. \$\endgroup\$ – DMGregory Sep 11 '16 at 23:29
-1
\$\begingroup\$

It does increase build size. I am not 100% sure, but unless unity has "smart building" and ignore scripts and objects not used in your application, it will increase the size for sure

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.