Search Unity

File Build Q - what about the unused assets?

Discussion in 'Editor & General Support' started by 3Dgal, Mar 31, 2011.

  1. 3Dgal

    3Dgal

    Joined:
    Aug 27, 2009
    Posts:
    17
    When you build your game, does Unity only includes assets that are used in the game? When you export a unity package, it goes through and checks dependencies and only includes what you use in the scene in the unity package.

    When you create a game, many times there are other scenes (WIP scenes), extra assets/prefabs/scripts that you may not use in the final game, will Unity only include assets that are used in the game? Or it just includes everything (including those extra assets that you are not using?)

    In order to shrink the file size, is it a good practice to delete things out of the Project folder that you are not using? Thanks for your help.
     
  2. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    I'm fairly certain Unity checks which files are used and only builds these into the game build.
    So deleting unused scenes and the like should'nt be necessary
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You can see in the editor log what's included after a build. Only referenced objects are included, except for the Resources folder.

    --Eric
     
  4. jonbonazza

    jonbonazza

    Joined:
    Nov 6, 2010
    Posts:
    453
    I believe that is a Pro only feature though, right?
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    What is, the Resources folder? No. Not the editor log either.

    --Eric
     
  6. 3Dgal

    3Dgal

    Joined:
    Aug 27, 2009
    Posts:
    17
    Thanks for all your help :)
     
  7. jonbonazza

    jonbonazza

    Joined:
    Nov 6, 2010
    Posts:
    453
    I meant the resource stripping feature. I know it is Pro only for hte mobile addons... Not sure for the PC/Mac version though.