Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Martian-Games · Oct 08, 2012 at 12:25 PM · buildsceneoptimizationassetsissue

Unity compiles assets from previous builds into an empty scene?

I notice Unity stuffs assets I've used for scenes in previous Builds into a Blank scene. (My builds have been getting bigger and bigger as a result of this 'leak'. To isolate the issue, I am Building a completely empty scene, but the Builder still thinks there are assets that should belong to it, thus making a huge blank webplayer.unity3d. At first it was 90Mb! So i deleted tons of assets i don't use anymore, and luckily Unity gave up looking for those, but this continues to be a problem.. Does anyone know if there is a file somewhere that I can clear/reset so it will rediscover what I actually need in a scene?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Martian-Games · Oct 08, 2012 at 06:10 PM 0
Share

That is correct. Only ONE blank scene is in the build options list for this test.

I noticed this issue at first because I had added a huge jungle pack to my assets folder, (but I had only used one little tree from the pack in my project) .. and to my dismay, my next build was 80$$anonymous$$b larger! Looking at the Editor Log, I saw what appeared to be every texture in the entire pack was being added! And upon closer exa$$anonymous$$ation, I realized there is not really any rhyme or reason to what assets it believes are 'used' in a scene. But it always insists on the same particular assets, until I completely remove one of them from the project folder. This temporarily cures the issue for that asset, but when I put that asset back into ANY folder, and even RENA$$anonymous$$E it .. it grabs it again for any scene I build, even if that ONE build-scene is completely empty. Strange. $$anonymous$$aybe should submit bug report? I wanted to try asking here first because perhaps another developer knows how this might happen. $$anonymous$$y first theory was maybe a build will insist certain assets are used because of which folder they are sitting in, or there might be some setting somewhere that forces certain types of assets to always be included. Any one have any clue? ;)

avatar image DannyB · Oct 08, 2012 at 06:21 PM 0
Share

I am curious about where this may lead. $$anonymous$$y builds have also seemed bigger than they should be, but I thought "I will optimize those textures later", but maybe I am also suffering from asset leakage... who knows... :)

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Martian-Games · Oct 08, 2012 at 08:06 PM

SOLUTION! (Destroy those Hidden Resources Folders!!!)

User 'whydoidoit' points out: Anything in a Resources folder will be included whether it is referenced or not.

Now, I assumed that this only applied to a Resources folder at the highest level .. BUT this is in fact true for ANY 'resources' folder found anywhere! So, if for example you wantto use the 'Tropical Nature Pack' - (from the unity store), you will find hundreds of assets tucked away in gobs of hidden 'resources' folders, thus an empty scene in your project will build up to 80Mb, even though you may not reference any of these hundreds of assets! The Solution is: KILL ALL THESE UNNECESSARY RESOURCE FOLDERS! Phew Thanks for pointing this out Mr. 'whydoidoit' !! :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by G_Koko · Oct 18, 2012 at 12:32 PM

Hi Steve, i have the same issue right now, when i build an empty scene the size of the app go to 300MB! It's insane. How you do that "Destroy hidden resources folder"?

Thanks

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Martian-Games · Oct 18, 2012 at 01:30 PM 0
Share

The best method might be:

  1. go to your 'Project' Tab

  2. type in the searchbox: 'resources'

  3. rename all those results: 'res' (or anything else) ins$$anonymous$$d

  4. now, when you run your game you will discover which resources you were actually trying to load using the Resources.Load() command .. now if you encounter any: simply rename ONLY those Resources folders that you actually need (back to 'Resources') for your current project!

or, you could use $$anonymous$$onodevelop to (ctrl-shift-F) search all files in 'Whole Solution' for this text: Resources.Load("

.. and then find exactly which folders those files you are loading are residing.. and rename the folders you don't need.

:)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Build just what's in the scene? 1 Answer

Does Unity include unreferenced scene assets in a build? 1 Answer

Building Player including assets not referenced in scenes included 2 Answers

Distribute terrain in zones 3 Answers

Selecting Assets from Scene 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges