Basically if I build the addressable and then try to build the porject using the scriptable built pipelin I get this error :
Fatal error in Unity CIL Linker
Mono.Linker.Steps.XmlResolutionException: Failed to process XML description: C:\Users\USER\Documents\GitHub\PROJECT\Assets\StreamingAssets\aa\AddressablesLink\link.xml —> System.ArgumentException: Name can not be empty
If I look at the link.xml I have these line that trigger the error :
After some more investigation I figured the issue is in the package com.unity.scriptablebuildpipeline@1.15.1 “Editor\Utilities\LinkXMLGenerator.cs”
From line 240 you add serialized reference types contianed in other assemblies. But when creating the assembly tag for the link.xml, you don’t add it’s attribute 'fullname" or rather, you don’t set it’s value.
Here is the corrected code :
//Add serialize reference classes which are contained in other assemblies not yet removed.
foreach (var k in m_SerializedClassesPerAssembly)
{
var assembly = linker.AppendChild(doc.CreateElement("assembly"));
var attr = doc.CreateAttribute("fullname");
attr.Value = k.Key;
assembly.Attributes.Append(attr); // FIX IS HERE
//Add content for this
foreach (var t in k.Value)
{
var typeEl = assembly.AppendChild(doc.CreateElement("type"));
var tattr = doc.CreateAttribute("fullname");
tattr.Value = t;
if (typeEl.Attributes != null)
{
typeEl.Attributes.Append(tattr);
var pattr = doc.CreateAttribute("preserve");
pattr.Value = "nothing";
typeEl.Attributes.Append(pattr);
var sattr = doc.CreateAttribute("serialized");
sattr.Value = "true";
typeEl.Attributes.Append(sattr);
}
}
After modifying this in a local copy of the package, the project built and ran as expected.
I’m pinging @unity_bill as I don’t know where or how to report such a bug.
Hi, This is fixed in 1.17.8 of Addressables and not 1.17.6-preview
We have had a dependency issue here, in that we fixed in it ScriptableBuildPipeline (1.16.2) at the time Addressables 1.17.6-preview was to be released. However Addressables has not been updated to use ScriptableBuildPipeline 1.16.2 until Addressables 1.17.8 (Which is released this week). I have changed the “fixed version” in our system, which hopefully should update the issue tracker soon.
We’re running into this issue, but we can’t update as it seems the only version of Addressables available to our Unity version (2021.1.6) is 1.16.19.
Did no other version made the jump to 2021?