25

For example, I might have Script.cs, but I would also have Script.cs.meta, or a folder named Sprites and a file named Sprites.meta. Why?

1

1 Answer 1

26

Well, meta fields are used to describe or specify a file, in version control too, but in unity meta files store the import settings of the files you have in your project. Your script or folder have a meta file which tells Unity how to prepare the asset in the project. If you delete a meta file Unity reimports the asset and creates the default meta file for that file type

2
  • 3
    Should I push meta files to version control or each machine should have their own meta files?
    – A.v
    Jul 15, 2020 at 8:15
  • 6
    @A.v Sync them too. Unity stores the guid in them. When Unity can't find the meta files, it creates new ones with different guids which will lead to missing behaviour errors.
    – Banana
    Aug 17, 2020 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.