Skip to content

Conversation

@kapitanmliko
Copy link
Contributor

Unity meta files are automatically generated by Unity editor and are not supposed to be modified manually. They also do not need to be part of the build. Therefore it does not make much sense to keep them present in project as they would only hinder.

With Unity meta files:
with_meta

Without Unity meta files:
without_meta

@JamJar00
Copy link
Member

Everything I can find on the internet says meta files should be checked in, can you share a link that backs up that we don't need it?

I agree they're awful but I don't know how UPM packages work so I have to trust the internet here!

@kapitanmliko
Copy link
Contributor Author

Yeah sorry, I probably didn't explain it clearly. Basically this does not remove those files in any way. They are still present just not included in .csproj.

If you open any unity generated csproj you can see that those files are not included there as well.

There will probably be something like:
<ItemGroup> <Compile Include="Assets\Scripts\MyScript.cs" /> </ItemGroup>
so every script is explicitly included but .meta files are not. They are around for the unity editor, but you cannot see/edit them as they are not meant to be edited.

But here we have them included by default so it might be a good idea to exclude them.

Thank you for you comment as I just noticed that this actually might not work as intended without the other PR I created. Might as well merge those on my end and create a new one.

@kapitanmliko
Copy link
Contributor Author

It was not problem with those two PRs being separate. It was an incorrect pattern for exclude. I have pushed a fix but merged those two anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants