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 MapuHoB · May 07, 2015 at 02:34 AM · resourcesfolder

Inside Resources folder vs outside

Does it matter, if I'm 100% sure that I use all of my game assets, whether they are all going to be in the Resources folder or outside of it?

P.S. I'm not sure what "use" is generally supposed to mean but what I mean by it is for example some textures are just used for a background, some others are attached to a script variable reference, the scripts are all attached as components to some of the gameObjects in the scenes, same with the materials and so on.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by smallbit · May 07, 2015 at 05:12 AM

Every Resources folder will be included in the build (not just Assets/Resources. It means that every script/texture/audio will be packed into apk whether you later use it in the game or not. Than is you are sure you are using the asset in the game by hard reference (i.e. through inspector reference), you better keep it outside of resources. It will still go into build anyway so in theory it doesn't matter whether it is inside of the Resources folder or not, but keeping it outside helps later when you face optimization problem/build size problem. Good practice is to keep in resources ONLY those assets that you load into game on runtime via Resources.Load... . Than everything that is OUTSIDE of resources folder, will NOT be packed into apk unless is referenced in any of the components in the game (i.e. in the inspector on the scene, sprite in the animation file etc..).

Shortly:

  • what is in the scene should be(but not necessarily need to) outside of resources and goes into apk.

  • what is outside of resources and not in the scene will not go into apk.

  • what is in resources and in/not in the scene will go to apk.

  • What is not used in the game should be outside of Resources folder

Analyze build log to see which assets are packed into build (console -> open editor log)

Comment
Add comment · Show 3 · 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 MapuHoB · May 07, 2015 at 05:26 AM 0
Share

So basically, no matter if some asset is in the Resources folder or out, if it's being referenced by a script, or used in any scene in general- it's certainly going in the apk?

Also my guess about scenes is that for them is better to be outside the Resources folder but it woudn't make any difference if they are inside because they are always included in the build?

avatar image smallbit · May 07, 2015 at 08:05 AM 0
Share

1) yes 2) yes but again keep resources folder clean :)

avatar image MapuHoB · May 07, 2015 at 10:28 AM 0
Share

Thanks! Now it makes sense.

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

19 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Subfolders with Resources.Load not working 2 Answers

Resource folder doesn't build. Why is it empty? 1 Answer

Special folders in subfolders ? 1 Answer

Is using the resource folder worth it? 4 Answers

Resources folder too big, files missing on build 0 Answers


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