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
6
Question by eazc · Mar 25, 2015 at 03:51 PM · unity 5gitversion-controlproject settingsmetafiles

Visible or hidden meta files with Git?

Hi! I'm setting up a Unity project using Git as an external version control system.

I started by reading a tutorial provided by Unity, which suggests using hidden meta files: http://unity3d.com/learn/tutorials/modules/beginner/architecture/folders-in-version-control

However, the Unity documentation clearly suggests using visible meta files: http://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html

So, which one would be the most recommended option to choose, visible or hidden meta files, especially now with Unity 5?

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
16
Best Answer

Answer by ThomasVandenberghe · Mar 25, 2015 at 04:44 PM

Use visible meta files, and commit them in GIT, if you don't do this, the next person or computer who gets the solution will generate new meta files because it can't find any.

Each meta file has a certain guid which is used to reference to the correct assets. The next time anything searches for this reference, it won't be found and your scene will be broken.

For scripts you will get something like "Missing script"

Comment
Add comment · Show 6 · 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 eazc · Mar 26, 2015 at 10:56 AM 0
Share

Thank you for the answer! I'll go with visible meta files.

avatar image akasurreal · Dec 10, 2015 at 03:22 AM 0
Share

Thank you for explaining this. I have not been committing *.meta because all the .gitignore templates I saw showed ignoring them, and I have been having all kinds of issues like you mentioned of missing scripts, etc.

avatar image zanyang1103 · Jan 05, 2016 at 03:12 PM 0
Share

having the same question,thanks for the answer,helps a lot!

avatar image Deepscorn · Jun 23, 2017 at 12:33 PM 0
Share

While $$anonymous$$Vandenberghe's answer is absolutely right, metas for some file types can be added to gitignore. For example adding .aar.meta or .jar.meta to gitignore is safe because Unity don't reference android and java archives directly from editor and do not add any configuration to those files

avatar image ThomasVandenberghe Deepscorn · Jun 23, 2017 at 12:41 PM 0
Share

They do however store wether the .jar or .aar files need to be included in specified build targets, so I would advice against ignore any meta files. Default they will be set to android only, but I have cases in which certain files shouldn't be included because they clash with other plugins which include the same files resulting in a dex build error.

avatar image Deepscorn ThomasVandenberghe · Jun 23, 2017 at 01:02 PM 0
Share

Sad but true. Thank you for pointing this thing out. By the way, that thing, I mean the clash with other plugins. It's why I prefer managing aar/jar files of native plugins in one place for android - in Assets/Plugins/Android/mainTemplate.gradle (which will be used as base for generating Temp/gradleOut/build.gradle - main build file) It's good for version aligning too. Good thing that unity added gradle build support with all those modern plugins with many dependencies like Firebase

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

6 People are following this question.

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

Related Questions

UnityYAMLMerge: File is not a valid text serialization YAML file 1 Answer

Error and conflict on meta files on repository and my pc 0 Answers

How to fix /Library/ conflicts in GitHub repo for Unity project? 1 Answer

Meta files: What is the "fileFormatVersion"? 1 Answer

SmartMerge with TortoiseSVN 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