Search Unity

Feedback Are all assets put in final build?

Discussion in 'Getting Started' started by pod11, Nov 5, 2020.

  1. pod11

    pod11

    Joined:
    Jan 6, 2019
    Posts:
    60
    Im just now downloading pack of 500 MB from unity asset store, and im probably going to use only a few sounds.
    My question is:
    Is unity going to inteligenly only put in those used assets into my builds or should i remove entire pack from my project and only leave in those im really using to reduce size of my game?
     
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    Only used assets or assets in resource are going to be included in final build.
     
  3. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Only the assets referenced by the scenes you include in the build are added to the build, as well as all assets in folders named "resources".
     
    geeteshCh likes this.
  4. pod11

    pod11

    Joined:
    Jan 6, 2019
    Posts:
    60
    is that resource folder you are talking about something that unity creates by default? i cant find that catalog.
     
  5. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    Some Assets may (still) come with this folder, but usually you'd need to create it for yourself if you need it. Newly created Projects don't have that folder, as it won't get created automatically.

    https://learn.unity.com/tutorial/assets-resources-and-assetbundles

    At the best, you should not use the Resources folder. Improper use of the Resources folder can bloat the size of a project’s build, lead to uncontrollable excessive memory utilization, and significantly increase application startup times.

    That's where the Addressable Asset system comes in.


    Transparency edit note: Reworded the sentence about not using the Resources folder.
     
    Last edited: Nov 5, 2020
    Ryiah and Joe-Censored like this.
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    "Never" may be a bit strong.
     
    Ryiah and AcidArrow like this.
  7. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    Agreed, I reworded the line. Hope it's better now?
     
    geeteshCh and Joe-Censored like this.