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
- [Android] The Player screen turns black when playing a video under certain conditions
- Search window icons at the bottom are cut off when Search window is resized vertically
- "Try something else?" text label is cut off when searching for a long text in the Search window
- Rendering Debugger window sections do not have a minimum width set when resizing with the slider in the middle of the window
- Last segment of a Sprite Shape Spline is affected by other segments' Sprite Variant change when no edge Sprite is selected
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