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
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
- New selector in Matching Selectors displays as on line -1 in debugger
- The first frames are skipped when playing a video
- Text auto-scrolling can not work when naming assets/objects until backspace key is pressed
Add comment