Skip to content

Commit 3ef02b1

Browse files
author
lawwong
committed
Avoid exception when there's un-resolved package in the project
When resolving RequiredSymbols, will check for file existence in both Assets folder and Packages folder Path for un-resolved package is empty
1 parent 3f9ba7a commit 3ef02b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Assets/HTC.UnityPlugin/VRModule/Editor/VRModuleManagerEditor.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,13 @@ private static bool DoesFileExist(string fileName)
606606
continue;
607607
}
608608

609-
string[] fileNamesInPackage = Directory.GetFiles(package.resolvedPath, fileName, SearchOption.AllDirectories);
609+
var resolvedPath = package.resolvedPath.Trim();
610+
if (string.IsNullOrEmpty(resolvedPath))
611+
{
612+
continue;
613+
}
614+
615+
string[] fileNamesInPackage = Directory.GetFiles(resolvedPath, fileName, SearchOption.AllDirectories);
610616
if (fileNamesInPackage != null && fileNamesInPackage.Length > 0)
611617
{
612618
return true;

0 commit comments

Comments
 (0)