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
9
Question by wenqisong · Jun 25, 2015 at 12:44 PM · libraryfolder

Is Library folder necessary?

I am so confused. In this article it's said that Assets and Library folders are necessary. http://docs.unity3d.com/Manual/BehindtheScenes.html But other articles said only Assets and ProjectSettings folders are necessary. I am so confused why there are different ideas.

Comment
Add comment · Show 1
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 AlanMattano · Feb 15, 2017 at 04:24 PM 0
Share

The manual was updated !

3 Replies

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

Answer by duck · Jun 25, 2015 at 02:49 PM

Hi, it looks like you may have found a piece of outdated information in the manual. (EDIT: this page has now been updated). Before we introduced separate ".meta" files which are stored in your Assets folder, this was true - the Library folder used to contain cached data & meta data.

However, in the Current version of Unity, we store the meta information alongside your asset files. The only data stored in the library folder is cached data which can be re-generated from your assets and their accompanying meta files.

The Meta Data stored in the .meta files in your Asset folder is the information and settings specified in the inspector when you examine an asset. Every file in your Asset folder should have a corresponding .meta file. For example, an image file's meta data would contain the settings for Texture Type, Wrap Mode, Aniso Level, Max size, etc. For a .FBX model file this would be the Scale Factor, mesh compression setting, Rig settings, Animation import settings etc. You can open these .meta files in a text editor and see the settings if you like.

Conversely, the Cached data in the Library folder is the game-ready imported data that has been extracted from your source asset according to the import settings that you specified in the inspector. For example - your source asset may be a PSD file, but graphics hardware can't use the data in that format, so the image is read & stored in a different format in the Library folder, ready to use as a texture. Similarly, for an FBX file - the model data, materials, animations, etc are all extracted and stored in a game-ready format in the Library folder.

If any of this cached data in the Library folder is missing, it can be re-created by Unity. All it needs are the source asset & the settings in the corresponding .meta file.

This is why, when checking your files into a version control system, you should only include the Assets and ProjectSettings folder.

(I'll add a note to get that Manual page updated!)

Comment
Add comment · Show 4 · 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 wenqisong · Jun 25, 2015 at 08:41 PM 0
Share

Thanks $$anonymous$$r Duck for your reply. The version I use is 4.3. Does this matter? I noticed there are meta data alongside with each file which means it will build the whole project properly. But when I only use Assets and ProjectSettings folders to reimport the project, there are missing some mesh filters. $$anonymous$$eshes can not be chose from assets folder as well. Can you explain why that happened?

avatar image duck ♦♦ wenqisong · Nov 02, 2015 at 12:33 PM 1
Share

Yes it does matter which version of Unity you're using. If you're using an old version of unity, you should refer to the old version of the $$anonymous$$anual (either installed on your computer, or here for the 4.3 manual )

The meta data contains vital information about how you have chosen to import your assets, and where they are used, so if you don't copy meta data files when you copy assets, you'll lose those import settings and usage references.

avatar image duck ♦♦ · Nov 02, 2015 at 12:35 PM 1
Share

FYI the outdated information on the page has now been updated:

http://docs.unity3d.com/$$anonymous$$anual/BehindtheScenes.html

avatar image ILICH · Feb 20, 2016 at 07:09 PM 1
Share

Hello Duck, can you please take a look at my question here http://answers.unity3d.com/questions/1142554/removing-library-folder-breaking-the-project.html

$$anonymous$$y scene breaks if I removing Library folder (or if I'm not including it into the source control)

Thank you!

avatar image
0

Answer by thomas4d · Dec 03, 2020 at 04:08 AM

Be careful I found this thread and deleted my libaray folder But Lucky Zipped my project before I deleted the Library folder, (as it was 13 gig the rest of the project was under 5 gigs. )

I got my project back, BUT when I did deleted the Library folder Unity crashed and crashed every time I tried to load the scene this is with Unity 2019.4.13f1 the only way got my project back was Restore the zipped backup..

in theory, Duck may be right sound all solid info ,. but in the real world be careful...

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 ken_unity779 · Apr 11, 2021 at 08:54 AM 0
Share

@duck Confir$$anonymous$$g same result as @thomas4d

After deleting my library, when I open my unity project, all of my content is gone. After restoring Library, it's all back again.

This is a blocker for me because I can't use cloud build if I can't build from my repo.

avatar image
-1

Answer by ken_unity779 · Apr 11, 2021 at 09:18 AM

As I understand it, you should be able to delete Library and count on Unity to rebuild it (and ignore it in version control). However, as @thomas4d has pointed out, reality may differ. I recommend backing up your project before deleting Library. If it breaks, restore the Library directory from backup.


Then, you should try to troubleshoot it. Delete a few subdirectories at a time and reload until something breaks, then narrow it down. It's important to be able to rely on Library functioning as a cache. Otherwise you can't effectively use version control or cloud build.

That's what I'm doing next. I'll try to remember to post my results in a comment below...

Comment
Add comment · Show 2 · 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 ken_unity779 · Apr 11, 2021 at 07:48 PM 0
Share

This file fails to regenerate if deleted: Library/LastSceneManagerSetup.txt

avatar image ken_unity779 · Apr 11, 2021 at 07:50 PM 0
Share

... and based on that insight, I found this gem: https://stackoverflow.com/questions/38024383/excluding-library-folder-from-git-for-unity-project-causes-scene-to-be-lost

Hope that helps.

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

8 People are following this question.

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

Related Questions

Removing Library folder is breaking the project 3 Answers

Managing the Library Folder 0 Answers

Unity AssetStore folder in Mac Library directory 0 Answers

Save image to resource and display 1 Answer

How do I enumerate the contents of an asset folder? 2 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