LoadResourceLocationsAsync returns RectOffset and ButtonClickedEvent?

Hi devs,

I have a very weird bug.
Basically, I call Addressables.LoadResourceLocationsAsync(label) and there’s a single prefab that causes issues: an address of form “xxx/yyy.prefab” is included multiple times in the returned list, with different ResourceType. Only the first is GameObject, the rest are weird types like RectOffset (see attached).

Attached is a debug view of the results list from Visual Studio where I only kept the 1st element in full (which is also the only one I’m expecting), and the following ones were stripped of duplicate properties, for clarity.

I’m not sure I can submit a bug report as I cannot share my project, and the issue doesn’t seem to happen in a fresh project.

Unity 2021.3.4f1
Addressables 1.20.0
These are all local groups, default options, no other fancy setup ATM

Tried deleting Library, disabling Accelerator, including the prefab directly in the group (as opposed to including its directory only), tried both Pack together and Pack separately.

The only thing that works is removing its label “LibGP-Dungeon”, but I need this label because I want to pre-load all assets labeled with it, before entering the main scene.

FastMode works, “Use Existing Build” doesn’t.

I’d really appreciate any guidance. I don’t want to ‘ignore’ the additional assets at runtime, as them being added in the first place may lead to hard-to-debug issues down the line…

I encountered this issue before: Many ContentCatalogDataEntries for unused types(e.g. UnityEngine.Events.PersistentCallGroup) .

Tried to modify the source code of GatherMainAndReferencedSerializedTypes function to ignore non UnityEngine.Object types, it dosen’t cause any problem for our project.

1 Like

Thanks, will continue there.

@Alan-Liu @thefallengamesstudio

Hi all will comment this on the other thread, but this will be fixed in the next release (1.20.2)
“Fixed issue where Serializable types of structs and class members of MonoBehaviour or ScriptableObjects would be returned as a location with GetResourceLocations but would not be loadable.”

1 Like