Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ public class UnityProjectInfo : IDisposable
"Windows.UI.Input.Spatial"
};

/// <summary>
/// For some Unity packages, references don't match the appropriate asmdef name.
/// </summary>
private static readonly Dictionary<string, string> ProjectAliases = new Dictionary<string, string>()
{
{ "Unity.ugui", "UnityEngine.UI" }
};

/// <summary>
/// Gets the name of this Unity Project.
/// </summary>
Expand Down Expand Up @@ -261,8 +269,16 @@ private CSProjectInfo GetProjectInfo(Dictionary<string, CSProjectInfo> projectsM

if (!asmDefInfoMap.TryGetValue(projectKey, out AssemblyDefinitionInfo assemblyDefinitionInfo))
{
Debug.Log($"Can't find an asmdef for project: {projectKey}; Unity actually allows this, so proceeding.");
return null;
if (ProjectAliases.TryGetValue(projectKey, out string projectAlias) && asmDefInfoMap.TryGetValue(projectAlias, out assemblyDefinitionInfo))
{
Debug.Log($"A reference was found for {projectKey}, which has known project alias ({projectAlias}). References were made to {projectAlias} instead of {projectKey}.");
projectKey = projectAlias;
}
else
{
Debug.Log($"Can't find an asmdef for project: {projectKey}; Unity actually allows this, so proceeding.");
return null;
}
}

CSProjectInfo toReturn = new CSProjectInfo(this, assemblyDefinitionInfo);
Expand Down