Addressable loading 10x slower than normal + Unknown Assembly error + Feedback

My game is quite large and has some resources that I don’t need until later in the game, and they aren’t tied to a particular scene. I load these resources asynch during loading screens.

I was putting these assets into a /Resources directory, which worked fine until I tried making a build and found out that you can’t have more than 4GB of Resources.

The easy solution, which in hindsight I should have gone with, is to just put everything into a master scene load that scene as a substitute asset bundle. However, I am stubborn and have wasted two days trying to get a better solution.

Which brings me to the new Addressable system. In FastMode everything works fine, load speed is good, so far so good. I can’t load synchronously, which is a huge design flaw and created a lot of bad architecture but that’s another topic.

The topics for this post…

First issue: Building assets for packed play mode, I’m spammed with

Unknown Assembly ModV1
UnityEditor.Build.Content.ContentBuildInterface:GetPlayerDependenciesForObjects(ObjectIdentifier[], BuildTarget, TypeDB)
UnityEditor.Build.Pipeline.Tasks.CalculateAssetDependencyData:Run() (at Library\PackageCache\com.unity.scriptablebuildpipeline@1.5.2\Editor\Tasks\CalculateAssetDependencyData.cs:107)
UnityEditor.Build.Pipeline.BuildTasksRunner:Run(IList`1, IBuildContext) (at Library\PackageCache\com.unity.scriptablebuildpipeline@1.5.2\Editor\Shared\BuildTasksRunner.cs:50)
UnityEditor.Build.Pipeline.ContentPipeline:BuildAssetBundles(IBundleBuildParameters, IBundleBuildContent, IBundleBuildResults&, IList`1, IContextObject[]) (at Library\PackageCache\com.unity.scriptablebuildpipeline@1.5.2\Editor\ContentPipeline.cs:118)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:smile:oBuild(AddressablesDataBuilderInput, AddressableAssetsBuildContext) (at Library\PackageCache\com.unity.addressables@1.1.7\Editor\Build\DataBuilders\BuildScriptPackedMode.cs:132)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:BuildDataImplementation(AddressablesDataBuilderInput) (at Library\PackageCache\com.unity.addressables@1.1.7\Editor\Build\DataBuilders\BuildScriptPackedMode.cs:90)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:BuildData(AddressablesDataBuilderInput) (at Library\PackageCache\com.unity.addressables@1.1.7\Editor\Build\DataBuilders\BuildScriptBase.cs:60)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl() (at Library\PackageCache\com.unity.addressables@1.1.7\Editor\Settings\AddressableAssetSettings.cs:1608)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent() (at Library\PackageCache\com.unity.addressables@1.1.7\Editor\Settings\AddressableAssetSettings.cs:1590)
UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor:OnBuildPlayerData() (at Library\PackageCache\com.unity.addressables@1.1.7\Editor\GUI\AddressableAssetsSettingsGroupEditor.cs:239)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32) (at C:\buildslave\unity\build\Editor\Mono\GUI\GenericMenu.cs:121)

ModV1 among other assemblies are used by my game to hold external code.

I created a link.xml to try to include this, not sure if it’s needed, the docs aren’t really very helpful as to when to use link.xml, why I would use it, or even how to use it or where to put it.


Anyway, if I ignore the error and run the game it does appear to load.

Here is part of link.xml at Client\Library\com.unity.addressables\StreamingAssetsCopy\aa\Windows\link.xml

Second issue:
What I’m actually loading is a custom ScriptableObject that holds a List.I can actually load it, the problem is instead of a list of 39 GameObjects, it’s a list of 39 null pointers.

Third issue: loading takes 10X longer in packed play mode vs. local! This totally defeats the point of loading asynch during loading screens since the total time is longer.

I don’t care about loading game data from remote systems, content updates, whatever. I just want to get around the 4 GB limit. How can I load resources dynamically that

  1. Is fast
  2. Doesn’t duplicate the resource (which Addressables and AssetBundles do?
  3. Doesn’t have a size limit (Which Resources does)?
1 Like

what version of addressables and the editor are you using?

What version of the editor are you running. There were some code stripping issues in 18.3 I believe. Maybe 19.1. In any case, if you have a recent 19.2 they should be fixed.

What if you hand edit our generated link.xml and add preserve=“all” to it?

Is it actually a List or is it List?

I’m not sure exactly what you’re comparing. Packed vs Fast mode? Packed vs having things in Resources? 99% of your dev can probably be done in Fast Mode.

  1. Addressables runtime loading shouldn’t be any slower than Resources. And it’s almost certainly more memory efficient. Also of note, building should be significantly faster. If you have many GB of data in Resources, then every time you build the player, it will rebuild all of that content. If you have addressables, and things are split into many asset bundles (as they should be), then it’ll do incremental building and only build what’s changed. Should be significant improvement.
  2. Use the Addressables Analyze functionality to find and remove duplicates. – if you do have a bunch of dupes this probably explains your 10x loading problem.
  3. use addressables. by the way, it has the 4gb limit per file too. you can just break things up into many bundles with addressables, whereas you can’t break up Resources.

“what version of addressables and the editor are you using?”

It was the latest version at the time I wrote the post, I downloaded it the day before. Probably 1.1.7. Editor 2019.2.0f1

“What if you hand edit our generated link.xml and add preserve=“all” to it?

I can try again, but already reverted the code in favor of using scenes as resources bundles. I load the scene that contains a game object, that contains a reference to my scriptable object. Because scenes are not ready the same frame they are loaded, I had to find every place in the game code that used a resource, which I could formerly load blocking, and change it to use IEnumerator.

"Is it actually a List or is it List? "
List. I wanted to clarify this, because even if it was List that would work if I used Resources, or used my current method of using Scenes as a fake asset bundle. I need to be able to have scripts on my assets.

"I’m not sure exactly what you’re comparing. Packed vs Fast mode? Packed vs having things in Resources? 99% of your dev can probably be done in Fast Mode. "
Comparing packed vs. resources

Has there been any change on this? I have a similar issue and this error fires 800 times when I generate bundles. Unity 2019.2.17, Addressables 1.7.5.

Unknown Assembly Rewired_Core
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent()
PlatformBuilds:BuildDLCStatic(BuildTarget) (at Assets/Scripts/PlatformBuilds.cs:369)
PlatformBuilds:<BuildDLC>b__15_0() (at Assets/Scripts/PlatformBuilds.cs:339)
UnityEditor.EditorApplication:Internal_CallDelayFunctions()

I am now seeing this after updating to addressable 1.8.3 from 1.7.5 while on unity 2019.3.9f1

Unknown Assembly DOTween
UnityEditor.GenericMenu:CatchMenu(Object, String[ ], Int32)
Unknown Assembly Sirenix.Serialization.Config
UnityEditor.GenericMenu:CatchMenu(Object, String[ ], Int32)

1 Like

I’m having the “Unknown Assembly DOTween” as well since 1.8.3 on Unity 2019.3.11
Not sure if this is harmless yet as I haven’t made a build yet. But if it is, I’ll revert back to 1.7.5
Here’s the stacktrace from the editor log

Unknown Assembly DOTween
UnityEditor.Build.Content.ContentBuildInterface:GetPlayerObjectIdentifiersInAsset_Injected(GUID&, BuildTarget)
UnityEditor.Build.Content.ContentBuildInterface:GetPlayerObjectIdentifiersInAsset(GUID, BuildTarget)
UnityEditor.AddressableAssets.Settings.AddressableAssetEntry:CreateCatalogEntries(List`1, Boolean, String, IEnumerable`1, Object, HashSet`1) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Settings\AddressableAssetEntry.cs:664)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptFastMode:GatherAssetsForFolder(AddressableAssetEntry, AddressableAssetsBuildContext) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Build\DataBuilders\BuildScriptFastMode.cs:163)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptFastMode:ProcessGroup(AddressableAssetGroup, AddressableAssetsBuildContext) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Build\DataBuilders\BuildScriptFastMode.cs:138)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:ProcessAllGroups(AddressableAssetsBuildContext) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Build\DataBuilders\BuildScriptBase.cs:119)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptFastMode:BuildDataImplementation(AddressablesDataBuilderInput) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Build\DataBuilders\BuildScriptFastMode.cs:90)
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:BuildData(AddressablesDataBuilderInput) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Build\DataBuilders\BuildScriptBase.cs:74)
UnityEditor.AddressableAssets.Build.AddressablesBuildScriptHooks:OnEditorPlayModeChanged(PlayModeStateChange) (at Library\PackageCache\com.unity.addressables@1.8.3\Editor\Build\AddressablesBuildScriptHooks.cs:59)
UnityEditor.EditorApplication:Internal_PlayModeStateChanged(PlayModeStateChange)
UnityEditor.EditorApplication:set_isPlaying(Boolean)
UnityEditor.Toolbar:TogglePlaying()
UnityEditor.Toolbar:smile:oPlayButtons(Boolean)
1 Like

I see the same errors every time I hit Play. I was sure it was something specific to this project only. Also using DOTween and Odin. Surprising to see it’s a common issue.

Addressables 1.8.3
Unity 2019.3.9

2 Likes

It seems to prevent me from building the bundles so I’m reverting back to 1.7.5

Same here

I decided to revisit addressables and it is still the case that Addressables doesn’t work when your project uses DLLs.

In the case the name of my DLL is ModV1

5784121--610399--upload_2020-4-29_22-25-13.png

When I double click the error it goes to this line of code:

var referencedObjects = ContentBuildInterface.GetPlayerDependenciesForObjects(includedObjects, m_Parameters.Target, m_Parameters.ScriptInfo);
in CalcualteAssetDependencyData.cs line 107

Using Addressables 1.1.10 with Unity 2019.3.11f1

In the Addressables Window I click Build / Build Player content then wait for an hour to get this result.

@unity_bill

Previously you suggested “What if you hand edit our generated link.xml and add preserve=“all” to it?

Referring to: “E:\Work\EmpireOfEmber\Client\Library\com.unity.addressables\StreamingAssetsCopy\aa\Windows\link.xml”

My own DLLs are listed twice:

and

I added preserve=“all” per your suggstion

However, upon hitting Build / Build Player E:\Work\EmpireOfEmber\Client\Library\com.unity.addressables\StreamingAssetsCopy\aa\Windows\link.xml is deleted by Unity, therefore my changes are lost.

If there is some other place I should creating a new link.xml let me know.

I’ve filed this as a reproducible bug
https://fogbugz.unity3d.com/default.asp?1243008_u0mordu61ousc0o5

1 Like

Any updates on this issue? Seems like a pretty major regression for Addressables. I hoping for a rapid fix. I submitted a bug report as well.

1 Like

I’m also experiencing the “Unknown Assembly DOTween” issue!

1 Like

I can confirm the “Unknown Assembly DOTween” with Unity 2019.3.11f1 and Addressables 1.8.3

I can confirm the “Unknown Assembly DOTween” (and with Odin’s dll too) with Unity 2018.2.17 and Addressables 1.8.3

Near as I can figure there is a dependency check happening and scripts that belong to DLLs are coming up and being processed. I see this primarily with Rewired because all the ControllerData files are types that exist only in the RewiredCore dll.

Confirming
“Unknown Assembly DOTween”
and also
“Unknown Assembly Sirenix.Serialization.Config”

with Unity 2019.3.13 and addressables 1.8.3

@unity_bill any updates on this issue ?
Thanks

3 Likes

I get “Unknown Assembly DOTween” too with the latest addressables and unity 2019.3. It doesn’t happen with 1.75, though this version is giving me headaches too.

I updated to 2020.1b to try and fix (and it seemed to) but there were so many other problems w 2020.1b that I had to switch back.

That bug above was closed bc the reporter decided not to use addessables after the trouble - weird reason to close a bug :
https://fogbugz.unity3d.com/default.asp?1243008_u0mordu61ousc0o5

1 Like