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
- Game view resolution does not scale mouse delta
- "UnassignedReferenceException" is thrown when building the project and a scene is selected in the Project View
- Android Player freezes on some Mali GPU devices when Lighting Cast Shadows changed to OFF at runtime
- Desktop Linux runtime does not respect -popupwindow command line argument
- Shader Graph more options dropdown button does not open the dropdown when clicked all the way to the right of the button
Add comment