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
- 2D Light Textures show the lights of any 'blend style' index higher than theirs (if present) when they aren't visible by the Camera using Render Graph
- [SpeedTree] Wireframe mode not rendering correctly ST assets
- Light2D affecting only the Default Sorting Layer will also affect any Custom Lit Sprite not on that Layer when using Render Graph
- Decals do not get projected onto a GameObject draw with the Render Objects Renderer Feature when according to Event it should be projected
- The Depth value is not being written correctly in the Scene view when the Full Screen Pass Renderer Feature is applied on a GameObject with the Render Object Feature
Add comment