When I want to build .aab
this error show up and stop the build process. How can I fix ?
NullReferenceException: Object reference not set to an instance of an object
Unity.Services.Core.Editor.LinkFileGenerator+<>c__DisplayClass12_0.<UnityEditor.Build.IUnityLinkerProcessor.GenerateAdditionalLinkXmlFile>b__5 (System.Type x) (at Library/PackageCache/com.unity.services.core@1.10.1/Editor/Core/Linker/LinkFileGenerator.cs:114)
string IUnityLinkerProcessor.GenerateAdditionalLinkXmlFile( BuildReport report, UnityLinkerBuildPipelineData data)
{
var coreAssemblyNames = GetCoreAssemblyNames();
var eligibleProviderPackageNames = TypeCache.GetTypesDerivedFrom<IServiceComponent>()
.Where(x => !x.IsAbstract && !coreAssemblyNames.Contains(x.Assembly.GetName().Name))
.Select(x => PackageInfo.FindForAssembly(x.Assembly))
.Where(x => !(x is null))
.GroupBy(x => x.name)
.Select(x => x.Key)
.ToList();
var packagesToLink = TypeCache.GetTypesDerivedFrom<IInitializablePackage>()
.Where(
x =>
{
var package = PackageInfo.FindForAssembly(x.Assembly);
return eligibleProviderPackageNames.Contains(package.name);
})
.GroupBy(x => x.Assembly)
.Select(x => x.Key)
.ToList();
return GenerateAdditionalLinkXmlFile(packagesToLink);
}