Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.1.10

Issue ID

ADDR-1854

Regression

No

[Addressables] LoadAssetAsync loads a Texture2D when UnityEngine.Object is used as a parameter and loading a Sprite

Package: Build Pipeline - Addressables

-

Reproduction steps:
1. Open attached project "Case_1298990" and load Scene "SampleScene"
2. Enter Play Mode
3. Observe the Console

Expected result: an asset of Type Sprite is loaded
Actual result: an asset of Type Texture2D is loaded

Reproducible with: Addressables 1.1.10 (2019.4.22f1, 2020.3.0f1), 1.16.16 (2019.4.22f1, 2020.3.0f1, 2021.1.0b11, 2021.2.0a8)
Could not test with: 2018.4.32f1 (project throws various package errors on entering Play Mode)

  1. Resolution Note:

    With most assets in the engine, there's just one object. Texture2D is one of the exceptions to this. Here the "main asset type" (the main object) is a Texture2D, and the asset also contains a Sprite object. So if we ask the engine for the asset as type "object", we'll get the main asset back, which is a Texture2D here. This is just how the engine treats this type of texture, and there's nothing to be done about it.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.