Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resharper create .meta file, but the content of .meta file is not match that of Unity! #2075

Open
qufangliu opened this issue Apr 20, 2021 · 4 comments

Comments

@qufangliu
Copy link

qufangliu commented Apr 20, 2021

Environment->
JetBrains Rider: 2020.2
ReSharper Keymap:202.5103.3
Unity 2020.2.2f1c1

Code file:

var text = $"fileFormatVersion: 2{le}guid: {guid:N}{le}timeCreated: {timestamp}";

Unity .meta file sample:

//for file
fileFormatVersion: 2
guid: 6cfcc7308f2d45b3a0f3916b657fb218
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:


//for folder
fileFormatVersion: 2
guid: 904f0af0e3a746cb85c1526072cf1f94
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:


ReSharper .meta file sample:

//for all
fileFormatVersion: 2
guid: bd8c4d9a30d5477d8d6d4557186f606b
timeCreated: 1618904398


@citizenmatt
Copy link
Member

Does this cause an issue? The key thing is that the guid is created, because that allows assets to be referenced in scenes, etc. and if that changes, those references can break.

@qufangliu
Copy link
Author

We need to analyze the content of .meta file to distinguish whether the file is a directory, and i don't know what else i need to read from the .meta file in the future.
I hope that the content of .meta file created by ReSharper same with that of Unity, if not, maybe offer a setting item to avoid ReSharper create .meta file.

@citizenmatt
Copy link
Member

Why are you reading the meta file to see if another path is a directory? Why not just call Directory.Exists()?

@qufangliu
Copy link
Author

We need to read the content of .meta file created by Unity for the Standard Check in our workflow. The .meta file created by ReSharper dosen't contain infomation about asset data.

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

No branches or pull requests

2 participants