resharper-unity
resharper-unity copied to clipboard
Resharper create .meta file, but the content of .meta file is not match that of Unity!
Environment-> JetBrains Rider: 2020.2 ReSharper Keymap:202.5103.3 Unity 2020.2.2f1c1
Code file: https://github.com/JetBrains/resharper-unity/blob/757759a8f723fb9d132840da60bb138b12ce5059/resharper/resharper-unity/src/ProjectModel/MetaFileTracker.cs#L278
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
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.
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.
Why are you reading the meta file to see if another path is a directory? Why not just call Directory.Exists()
?
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.