Search Issue Tracker
Fixed in 2020.1
Votes
0
Found in
2020.1.10f1
2020.2.0b8
2021.1
2021.1.0a2
Issue ID
1287664
Regression
Yes
Error is thrown when entering the Play Mode while Inspector and Tile Palette are opened and GameObject with Grid is selected
How to reproduce:
1. Open the attached "1287664" project
2. Open the Scene "SampleScene"
3. Make sure the Inspector window is visible (Window->General->Inspector)
4. Make sure the Tile Palette window is turned on anywhere (Window->2D->Tile Palette), doesn't have to be visible
5. Select the "Grid" GameObject
6. Keep entering and exiting the Play Mode until an error is thrown in the console (might take tens of tries for the error to appear)
Expected results: No errors are thrown when entering the Play Mode
Actual results: The "NullReferenceException: Object reference not set to an instance of an object" error is thrown when entering the Play Mode
Reproducible with: 2020.1.10f1, 2020.1.12f1, 2020.2.0b8, 2020.2.0b10, 2021.1.0a3
Not reproducible with: 2018.4.28f1, 2019.4.14f1, 2020.1.9f1, 2020.2.0a1, 2020.2.0b7
Notes:
- A Palette has to be selected in the Tile Palette window but the Palette can be empty
- This issue has been introduced from the case 1271740 fix (same error except it points to a different line in the script and slightly different requirements to reproduce the issue)
- The full error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GameObjectInspector.ClearPreviewCache () (at <859685c8158c480a8d135de9619162c9>:0)
UnityEditor.GameObjectInspector.ReloadPreviewInstances () (at <859685c8158c480a8d135de9619162c9>:0)
UnityEditor.GameObjectInspector.OnForceReloadInspector () (at <859685c8158c480a8d135de9619162c9>:0)
UnityEditor.Tilemaps.GridPaintPaletteClipboard:OnDisable() (at C:/Program Files/2021.1/2021.1.0a1_eff81b68729d/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.2d.tilemap/Editor/GridPaintPaletteClipboard.cs:347)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Terrain inspector is suggesting a shader which doesn't work
- [Vulkan] Build crashes with vk_icdNegotiateLoaderICDInterfaceVersion after minimizing and then maximizing the Window
- [Search] Index Manager: Empty item in Include or Exclude list will be taken in count
- [Search] Index Manager folder browse button is limited to Asset folder
- [Search] User Created Indices disappear from manager list if disabled
Resolution Note (fix version 2020.1):
A fix for this issue will be available on Unity 2021.1.0a7 and above