MSBuildForUnity icon indicating copy to clipboard operation
MSBuildForUnity copied to clipboard

Add PackagesPath to the ScanAndProcessKnownFolders method in UnityProjectInfo.cs

Open rubengonzalezlodeiro opened this issue 5 years ago • 0 comments

When you are developing packages is quite common to have them directly in the Packages folder, but this folder is not scanned, and thus csproj files are not processed correctly. When the package is published and downloaded using UPM it works fine. The ScanAndProcessKnownFolders (UnityProjectInfo.cs:461) should contain an additional call to ScanAndProcessFiles with PackagesPath. This is how the method should look.

private void ScanAndProcessKnownFolders( Dictionary<string, Action<string, Guid>> extensionCallbacks) {
  ScanAndProcessFiles(Utilities.AssetPath, extensionCallbacks);
  ScanAndProcessFiles(Utilities.PackagesPath, extensionCallbacks);
  ScanAndProcessFiles(Utilities.PackageLibraryCachePath, extensionCallbacks);
}

rubengonzalezlodeiro avatar Apr 29 '20 16:04 rubengonzalezlodeiro