Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Unity, what happens if I delete the meta files? Or if I import does, but not their respective .meta files?

What are some issues I could come across? Is there ever a reason I want to delete.meta files?

I was asked this question recently, and I do not know the answer.

share|improve this question
    
short answer: bad things. .meta files store information about the file with the same name, information that is used by unity and that can be indirectly changed by content creators. if you delete them you loose that information and, depending on what you removed, references can be lost, things have to be reconfigured, etc – Raxvan 14 hours ago

Some .meta files contain important information.

For example, this is part of a .meta file for a .png file in our project:

fileFormatVersion: 2
guid: a652b1795b650454a8270045af8e2a71
timeCreated: 1459880238
licenseType: Pro
TextureImporter:
  fileIDToRecycleName: {}
  serializedVersion: 2
  mipmaps:
    mipMapMode: 0
    enableMipMap: 0
    linearTexture: 0
    correctGamma: 0
    fadeOut: 0
    borderMipMap: 0
    mipMapFadeDistanceStart: 1
    mipMapFadeDistanceEnd: 3
  bumpmap:
    convertToNormalMap: 0
    externalNormalMap: 0
    heightScale: 0.25
    normalMapFilter: 0

You can see there are a lot of settings that tell Unity how to use the associated .png file.

If you delete this .meta file, it will regenerate it, but you'll lose any import settings you had set. It can cause other issues, but just this example should be enough to convince you to leave them alone. :)

share|improve this answer
6  
For this same reason, you'll run into trouble if you gitignore them. – tyjkenn 12 hours ago

Yes - Unity will reimport all of the assets and the project will rebuild the next time it is launched, if the 'metadata' folder is deleted.

It won't help cut down the file size, because the folder will re-create and grow to about the same size.

share|improve this answer
2  
This seems to ignore the obvious fact that you will still lose "progress" if you delete a meta file. Not everything will be rebuilt. – Gnemlock 10 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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