Skip to content

Commit 9cb0923

Browse files
committed
Fixed the assembly definition search not checking for consistent folder separators
1 parent 7c75931 commit 9cb0923

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scripts/Editor/Utils/AsmDefUtility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ public static AssemblyDefinitionAsset GetAsmDefInFolder(string path)
218218
string[] asmDefsGuids = AssetDatabase.FindAssets("t:asmdef", new[] { path });
219219
for (int i = 0; i < asmDefsGuids.Length; i++)
220220
{
221-
string asmDefPath = AssetDatabase.GUIDToAssetPath(asmDefsGuids[i]);
221+
string asmDefPath = AssetDatabase.GUIDToAssetPath(asmDefsGuids[i]).ToPathWithConsistentSeparators();
222222
string asmDefDirectory = Path.GetDirectoryName(asmDefPath);
223223

224-
if (asmDefDirectory == path)
224+
if (string.Equals(asmDefDirectory, path, StringComparison.Ordinal))
225225
return AssetDatabase.LoadAssetAtPath<AssemblyDefinitionAsset>(asmDefPath);
226226
}
227227

0 commit comments

Comments
 (0)