Search Issue Tracker
Fixed
Votes
0
Found in [Package]
1.14.2
Issue ID
ADDR-1456
Regression
Yes
[Addressables] NullReferenceException is thrown when trying to assign an element to a AssetReferenceSprite array
How to reproduce:
1. Open the user's attached "AddressableSpriteBug.zip" project
2. Open the "SampleScene" Scene
3. Create a new empty GameObject in the Hierarchy window (Right-click -> Create Empty)
4. Add the "Sprite Loader" Component to the newly created GameObject in the Inspector window
5. Set the "Sprites" property's Size value to 1
6. Select any Sprite in the "Element 0" field
Expected result: Sprite is assigned to the AssetReferenceSprite array and no errors are thrown in the Console log
Actual result: Sprite is not assigned to the AssetReferenceSprite array and "NullReferenceException: Object reference not set to an instance of an object" error message is getting spammed in the Console log (Full error message in Edit)
Reproducible with: 1.14.2 (2018.4.26f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0a21)
Not reproducible with: 1.13.1 (2018.4.26f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0a21)
Notes:
- If AssetReferenceSprite array contains elements in 1.13.1, the AssetReferenceSprite array will lose references to its elements when upgraded to 1.14.2
- Sprites cannot be loaded during runtime since no elements can be assigned to the AssetReferenceSprite array
- The issue is also reproducible with List<AssetReferenceSprite>, but not when assigning to a single AssetReferenceSprite field
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
- Hovering on the three-dot menu also highlights the tab header near it when not all tabs fit the bar
Add comment