in resharper/resharper-unity/src/Unity/Core/Feature/Services/Technologies/UnityTechnologyDescriptionCollector.cs [30:141]
public UnityTechnologyDescriptionCollector(Lifetime lifetime, ISolution solution, ISolutionLoadTasksScheduler tasksScheduler,
UnitySolutionTracker solutionTracker, PackageManager packageManager)
{
myTasksScheduler = tasksScheduler;
myPackageManager = packageManager;
myDescriptions = new List<IUnityTechnologyDescription>()
{
new HDRPUnityTechnologyDescription(),
new CoreRPUnityTechnologyDescription(),
new URPUnityTechnologyDescription(),
new EntitiesUnityTechnologyDescription(),
new InputSystemUnityTechnologyDescription(),
new BurstUnityTechnologyDescription(),
new OdinUnityTechnologyDescription(),
new PhotonUnityTechnologyDescription(),
new PeekUnityTechnologyDescription(),
new UniRxUnityTechnologyDescription(),
new UniTaskUnityTechnologyDescription(),
new DOTweenTechnologyDescription(),
new UnityTestFrameworkDescription(),
new PythonScriptingUnityTechnologyDescription(),
new AddressablesUnityTechnologyDescription(),
new AndroidLogCatUnityTechnologyDescription(),
new CodeCoverageUnityTechnologyDescription(),
new UnityCollectionsUnityTechnologyDescription(),
new EditorCoroutinesUnityTechnologyDescription(),
new EntitiesGraphicsUnityTechnologyDescription(),
new LocalizationUnityTechnologyDescription(),
new MathematicsUnityTechnologyDescription(),
new TransportUnityTechnologyDescription(),
new UnityPhysicsUnityTechnologyDescription(),
new HavokUnityTechnologyDescription(),
new MlAgentsUnityTechnologyDescription(),
new MultiplayerToolsTechnologyDescription(),
new NetCodeUnityTechnologyDescription(),
new NetCodeGameObjectsUnityTechnologyDescription(),
new SerializationUnityTechnologyDescription(),
new LoggingUnityTechnologyDescription(),
new MemoryProfilerUnityTechnologyDescription(),
new ProfilerAnalyzerUnityTechnologyDescription(),
new ProfilingCoreUnityTechnologyDescription(),
new CollabUnityTechnologyDescription(),
new VisualScriptingUnityTechnologyDescription(),
new HotReloadUnityTechnologyDescription(),
new NoesisUnityTechnologyDescription()
};
myProjectsProcessed.Compose(lifetime, myPackagesProcessed, (a, b) => a && b).AdviseUntil(lifetime, v =>
{
if (v)
{
Ready.Value = true;
return true;
}
return false;
});
foreach (var description in myDescriptions)
{
myDiscoveredTechnologies[description.Id] = false;
}
myTasksScheduler.EnqueueTask(new SolutionLoadTask(GetType(), "UnityTechnologyDescriptionCollector", SolutionLoadTaskKinds.Done,
() =>
{
if (!solutionTracker.HasUnityReference.HasTrueValue())
{
myProjectsProcessed.Value = true;
myPackagesProcessed.Value = true;
return;
}
myPackageManager.IsInitialUpdateFinished.AdviseUntil(lifetime, v =>
{
if (v)
{
try
{
foreach (var (_, data) in myPackageManager.Packages.ToList())
{
ProcessPackage(data);
}
}
finally
{
myPackagesProcessed.Value = true;
}
return true;
}
return false;
});
using (ReadLockCookie.Create())
{
var projects = solution.GetAllProjects();
try
{
foreach (var project in projects)
{
ProcessProject(project);
}
}
finally
{
myProjectsProcessed.Value = true;
}
}
}));
}