ignore meta files of unity packages #4173
Open
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unity will automatically generate meta files for just about any file added to its directory structure. This is in order to maintain references between things that may be moving around or getting renamed in the project.
It's very common that an asset from the Unity Asset Store comes with
.unitypackagefiles for optional features or compatibility add-ons. In such a case, the importer's machine will contain a.unitypackageand.unitypackage.metafile.The
.unitypackagefile is ignored by this template, but the.unitypackage.metafile is not. If the meta file isn't also ignored, the person who imports an asset containing a.unitypackagefile could accidentally commit the meta files. The next person will pull in those meta files, which Unity will consider orphaned without the accompanying.unitypackagefile. Unity will automatically delete the orphaned meta files, and those deletes also tend to get committed. The importer auto-adds and commits them again, and the cycle goes on and on until someone like me gets fed up.This change fixes that inconsistency by adding the
*.unitypackage.metato the ignore list.