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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
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