Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.2.11f1
2019.3
2020.1
2020.2
Issue ID
1231054
Regression
Yes
A null reference exception is thrown when trying to access EditorStyles.miniTextField property during script recompilation
How to reproduce:
1. Open the attached 'project-1231054.zip' project
2. Select the 'TestEditor' in the Hierarchy window
3. Open the 'TestScript' and make a code change to trigger script recompilation
4. Return to the Editor and observe the Console window
Expected result: no exceptions are thrown
Actual result: an exception is thrown
Reproducible with: 2018.4.20f1, 2019.3.8f1, 2020.1.0b4, 2020.2.0a5
Not reproducible with: 2017.4.38f1
Thrown exception:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorStyles.get_miniTextField () (at <b5e754b172ef4f1b82e78043441796df>:0)
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
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
- Sprite Renderer with Animation does not reflect Sprite changes in the Scene when switching Mask Interaction
- Error "NullReferenceException: Object reference not set to an instance of an object" is present when loading 3D text mesh in Player from an asset bundle that is built with an older Editor version
Resolution Note:
EditorStyles are invoked at a time in the script compilation pipeline where the Styles are not yet built. It would be risky and tedious to alter the current design and build the styles during the script compilation. Hence at this point we may not be able to fix this issue